i have a project that bigger then 32KB and i am looking for solution since keil has limitation (in the free version)
i saw that compiler is fine and the problem is the linker.
what can i do? do you know about others tools to build my bin file?
In keil i configure the linker to use R/O base to 0xA000000 and R/W base to 0xA0080000
and also configure it to create bin file and axf. something like that (under user tab,in run after build): fromelf --bin --output=Sensor.bin SensorSimHydra.axf
how can i do all this in GCC?
can you please give me example what is the correct command to creat bin file for hydra in case i have files like a.c, b.c , a.h, b.h? and i want to bin to called myBin.bin?
@ shm3 - You do not need to set these addresses, you can convert the output to raw binary file which is then loaded by the managed code to the correct address for RLPLite on the Hydra.
Here is a snippet from the batch file that I use
Note: RLPProxyGen is a little tool that I wrote which generates the managed stubs from the map file, it resolves all the function addresses etc. (You can find an early version on code share, if it does not work let me know and I will put up the latest code).
@ echo off
echo Building
if exist Output goto startbuild
md Output
:startbuild
make
if not errorlevel 0 goto error
echo Copying
\Embedded\ARMEmbedded\4.6.2012q2\arm-none-eabi\bin\objcopy.exe -O binary Output\RLPForth.elf Output\RLPForth.bin
copy Output\RLPForth.bin ..\dotnetwarrior.NetMF.Native.Forth\Resources> /y
RLPProxyGen Output\RLPForth.map ..\dotnetwarrior.NetMF.Native.Forth\RLPMethods.cs RLPMethods
goto done
:error
echo Build with errors
:done
echo Done.
The key thing here is the objcopy.exe command which converts the elf file to raw binary which can be loaded onto the Hydra.
Here is the makefile I use, this is for one of my RLPLite projects on the Hydra. The commented sections play with the optimizations and generation of assembly listing which is sometimes helpful when troubleshooting.
@ shm3 - What make tool are you running? I am using make that was installed with the yagarto tool chain but I am using the ARM tool chain. If you grab GNU Make for windows it should work, I have not tried it myself though.
Just some creative thinking… maybe its possible to use KEIL just for compilation if it produces better code than a GNU compiler, and use the GNU linker to link everything together.
[quote]C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2013q2\bin>arm-none-eabi-gcc.exe make
arm-none-eabi-gcc.exe: error: make: No such file or directory
arm-none-eabi-gcc.exe: fatal error: no input files
compilation terminated.
C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2013q2\bin>make
’make’ is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2013q2\bin>makefile
’makefile’ is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2013q2\bin>arm-none-eabi gcc.exe makefile
c:/program files (x86)/gnu tools arm embedded/4.7 2013q2/bin/…/lib/gcc/arm-none
-eabi/4.7.4/…/…/…/…/arm-none-eabi/bin/ld.exe:makefile: file format not recog
nized; treating as linker script
c:/program files (x86)/gnu tools arm embedded/4.7 2013q2/bin/…/lib/gcc/arm-none
-eabi/4.7.4/…/…/…/…/arm-none-eabi/bin/ld.exe:makefile:2: syntax error
collect2.exe: error: ld returned 1 exit status[/quote]
@ shm3 - you do not seem to have make installed or it is not in the path. Make is a build tool that will process the makefile and build your code. So you first need to get make on your machine.
Install the yagarto tools from the link below to get make. Note, do not install in a path with spaces.
what should i do with this file?
Just save it as lds file?
i succeeded to build my project without this file, converted it to bin, called it from C# but i saw it didnt come in to RLP.
(the address was correct).
i guess it also because my symbol starts at 0x0000800 (with keil i configured it to R/O base to 0xA000000 and R/W base to 0xA0080000)