[hpsdr] how to setup the firmware project using eclipse?

Philip Covington p.covington at gmail.com
Wed Oct 24 11:38:11 PDT 2007


Hi Johan, Bill,

Just a note on using Eclipse to build the FX2 firmware:

as you know, vectors.rel needs to be linked in first.  Unfortunately,
eclipse builds the REL list alphabetically so vectors.rel gets linked
in last.

If you rename vectors.asm, usb_descriptors.asm, and _startup.asm to:

_0_vectors.asm
_1_usb_descriptors.asm
_2_startup.asm

respectively, eclipse will now link them in the correct order since
this forces the names to appear first in the list... _0_vectors.asm is
at the top so it gets linked first.

73 Phil N8VB



On 7/3/07, Johan Maas <johan.maas at hetnet.nl> wrote:
> ***** High Performance Software Defined Radio Discussion List *****
>
>
>
>
> Hi,
>
>
> After installing, asking, and reading i succeeded in compiling the firmware:
>
>
> I found that the project cannot be build by eclipse (managed make
> functionality is not available).
>
> Iam working on a windows platform; so i created some batch files; the code
> is compiled but not yet linked (-c option)
>
>
> C:\Documents and Settings\Dhr.
> Maas\workspace\OzyFirmware-wjt\Initial\src
>
> sdcc --verbose -o".\compiled\\" -c -I"C:\Program Files\SDCC\lib"
> -I"..\include" hpsdr_main.c
> sdcc --verbose -o".\compiled\\" -c -I"C:\Program Files\SDCC\lib"
> -I"..\include" sdr1kctl.c
> sdcc --verbose -o".\compiled\\" -c -I"C:\Program Files\SDCC\lib"
> -I"..\include" hpsdr_common.c
> sdcc --verbose -o".\compiled\\" -c -I"C:\Program Files\SDCC\lib"
> -I"..\include" fpga_load.c
> sdcc --verbose -o".\compiled\\" -c -I"C:\Program Files\SDCC\lib"
> -I"..\include" eeprom_io.c
> sdcc --verbose -o".\compiled\\" -c -I"C:\Program Files\SDCC\lib"
> -I"..\include" board_specific.c
> copy .\compiled\*.rel .
> copy .\compiled\*.lst .
> pause
>
> C:\Documents and Settings\Dhr.
> Maas\workspace\OzyFirmware-wjt\Initial\src\lib
> sdcc --verbose -o".\compiled\\" -c -I"C:\Program Files\SDCC\lib"
> -I"..\..\include" delay.c
> sdcc --verbose -o".\compiled\\" -c -I"C:\Program Files\SDCC\lib"
> -I"..\..\include" fx2utils.c
> sdcc --verbose -o".\compiled\\" -c -I"C:\Program Files\SDCC\lib"
> -I"..\..\include" i2c.c
> sdcc --verbose -o".\compiled\\" -c -I"C:\Program Files\SDCC\lib"
> -I"..\..\include" isr.c
> sdcc --verbose -o".\compiled\\" -c -I"C:\Program Files\SDCC\lib"
> -I"..\..\include" spi.c
> sdcc --verbose -o".\compiled\\" -c -I"C:\Program Files\SDCC\lib"
> -I"..\..\include" timer.c
> sdcc --verbose -o".\compiled\\" -c -I"C:\Program Files\SDCC\lib"
> -I"..\..\include" usb_common.c
> copy .\compiled\*.rel .
> copy .\compiled\*.lst .
> pause
>
> Compiling asm code:
> C:\Documents and Settings\Dhr.
> Maas\workspace\OzyFirmware-wjt\Initial\src\asm
> asx8051 -losg vectors.asm
> asx8051 -losg _startup.asm
> asx8051 -losg usb_descriptors_X1.asm
>
>
> Here we are linking the objects:
>
> C:\Documents and Settings\Dhr.
> Maas\workspace\OzyFirmware-wjt\tools
>
> # bit of a hack becasue I can't seem to get the input file order for obj
> modules
> # correct using standard eclipse -- vectors.rel MUST be the first object in
> the link list
> echo 'Executing custom-link.zsh'
> sdcc --verbose -L"C:\Program Files\SDCC\lib" --no-xinit-opt --xram-loc
> 0x2000 --xram-size 0x2000 --code-size 0x2000 -Wl -b" USBDESCSEG = 0xE000"
> -o"ozyfw-pa3gsb.hex"  .\..\Initial\src\asm\vectors.rel
> .\..\Initial\src\asm/_startup.rel
> .\..\Initial\src\asm\usb_descriptors_X1.rel
> .\..\Initial\src\lib\delay.rel
> .\..\Initial\src\lib\fx2utils.rel
> .\..\Initial\src\lib\i2c.rel .\..\Initial\src\lib\isr.rel
> .\..\Initial\src\lib\spi.rel .\..\Initial\src\lib\timer.rel
> .\..\Initial\src\lib\usb_common.rel
> .\..\Initial\src\board_specific.rel
> .\..\Initial\src\eeprom_io.rel .\..\Initial\src\fpga_load.rel
> .\..\Initial\src\hpsdr_common.rel
> .\..\Initial\src\hpsdr_main.rel
> .\..\Initial\src\sdr1kctl.rel
>
> pause
>
>
> Hope this helps others; maybe someone knows how to setup eclipse to build
> the firmware from the eclipse environment.
>
> Regards,
>
> Johan PA3GSB
>
> _______________________________________________
> HPSDR Discussion List
> To post msg: hpsdr at hpsdr.org
> Subscription help:
> http://lists.hpsdr.org/listinfo.cgi/hpsdr-hpsdr.org
> HPSDR web page: http://hpsdr.org
> Archives: http://lists.hpsdr.org/pipermail/hpsdr-hpsdr.org/
>



More information about the Hpsdr mailing list