Greetings to you all.
This is my first message to this mailinglist. I received the SIMtrace hardware this week and I seem to get stuck at the point of making the firmware at this point:
make BOARD=SIMTRACE DEBUG=1 TARGET=main_simtrace I am following the usernamual2.pdf,and I am trying to use my head, so far without too much success.
The step before that is going fine: make -f Makefile.dfu BOARD=SIMTRACE
Can anyone point me in the right direction on what toolchain to use and help me with the make-ussues below?
Thank you, Marnix
------------------------------------------------------------------------------------------------------------------------------------------------
- I tried:
- Linux-builds: CentOS 6.2 64-bitsVM, a CentOS 6.2 32-bitsVM and finally an Ubuntu 11.10 32-bits VM. - ARM-toolchain: GNU-arm (from the Wiki) and the CodeSourcery (advised at the openpcd website)
- Result:
With GNUarm:
marnix@ubuntu:~/openpcd/firmware$ make BOARD=SIMTRACE DEBUG=1 TARGET=main_simtrace
-------- begin (mode: RUN_FROM_ROM) -------- arm-elf-gcc (GCC) 3.4.3 Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Assembling (ARM-only): src/start/Cstartup_app.S arm-elf-gcc -c -mcpu=arm7tdmi -I. -x assembler-with-cpp -DRUN_FROM_ROM -D__AT91SAM7S128__ -Wa,-adhlns=src/start/Cstartup_app.lst,--gdwarf-2 -Iinclude/ -D__ASSEMBLY__ src/start/Cstartup_app.S -o src/start/Cstartup_app.o /home/marnix/gnuarm/bin/../lib/gcc/arm-elf/3.4.3/../../../../arm-elf/bin/as: unrecognized option '--gdwarf-2' make: *** [src/start/Cstartup_app.o] Error 1
When I change DEBUG-format from dwarf-2 to stabs I get this error: DEBUGF = stabs #DEBUGF = dwarf-2
Linking: main_simtrace.elf arm-elf-gcc -mcpu=arm7tdmi -I. -gstabs -DRUN_FROM_ROM -D__MS_types__ -D__LIBRFID__ -DDEBUG -DSIMTRACE -D__AT91SAM7S128__ -Isrc/simtrace -Iinclude -Isrc -O2 -Wall -Wextra -Wcast-align -Wimplicit -Wunused -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wshadow - Wbad-function-cast -Wsign-compare -Waggregate-return -Wa,-adhlns=src/start/Cstartup_app.lst -I../../librfid//include/ -ffunction-sections -fdata-sections -MD -MP -MF .dep/main_simtrace.elf.d src/start/Cstartup_app.o lib/changebit.o lib/clearbit.o lib/setbit.o lib/testchangebit.o lib/testclearbit.o lib/testsetbit.o lib/lib1funcs.o lib/div64.o lib/lib_AT91SAM7.o lib/vsprintf.o lib/ctype.o lib/string.o src/os/pcd_enumerate.o src/os/fifo.o src/os/dbgu.o src/os/led.o src/os/req_ctx.o src/os/trigger.o src/os/main.o src/os/syscalls.o src/os/usb_handler.o src/os/usb_benchmark.o src/os/tc_cdiv.o src/os/pit.o src/os/pwm.o src/os/pio_irq.o src/os/usbcmd_generic.o src/os/wdt.o src/os/blinkcode.o src/os/system_irq.o src/os/flash.o src/simtrace/iso7816_uart.o src/simtrace/tc_etu.o src/simtrace/sim_switch.o src/simtrace/spi_flash.o src/simtrace/main_simtrace.o --output main_simtrace.elf - nostartfiles -Wl,-Map=main_simtrace.map,--cref -lc -lgcc -L../../librfid//src/.libs/ -Wl,--gc-sections -Wl,--entry=_startup -Tlink/AT91SAM7S128-ROM-sam7dfu-app.ld src/simtrace/sim_switch.o(.bss.stats+0x0): In function `sim_switch_init': src/simtrace/sim_switch.c:69: multiple definition of `stats' src/simtrace/iso7816_uart.o(.bss.stats+0x0):src/simtrace/iso7816_uart.c:668: first defined here src/simtrace/spi_flash.o(.bss.stats+0x0): In function `spiflash_id': src/simtrace/spi_flash.c:137: multiple definition of `stats' src/simtrace/iso7816_uart.o(.bss.stats+0x0):src/simtrace/iso7816_uart.c:668: first defined here src/simtrace/main_simtrace.o(.bss.stats+0x0): In function `_main_func': src/simtrace/main_simtrace.c:220: multiple definition of `stats' src/simtrace/iso7816_uart.o(.bss.stats+0x0):src/simtrace/iso7816_uart.c:668: first defined here collect2: ld returned 1 exit status make: *** [main_simtrace.elf] Error 1
With CodeSourceryARM-toolchain:
Linking: main_simtrace.elf arm-none-eabi-gcc -mcpu=arm7tdmi -I. -gdwarf-2 -DRUN_FROM_ROM -D__MS_types__ -D__LIBRFID__ -DDEBUG -DSIMTRACE -D__AT91SAM7S128__ -Isrc/simtrace -Iinclude -Isrc -O2 -Wall -Wextra -Wcast-align -Wimplicit -Wunused -Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type - Wshadow -Wbad-function-cast -Wsign-compare -Waggregate-return -Wa,-adhlns=src/start/Cstartup_app.lst -I../../librfid//include/ -ffunction-sections -fdata-sections -MD -MP -MF .dep/main_simtrace.elf.d src/start/Cstartup_app.o lib/changebit.o lib/clearbit.o lib/setbit.o lib/testchangebit.o lib/testclearbit.o lib/testsetbit.o lib/lib1funcs.o lib/div64.o lib/lib_AT91SAM7.o lib/vsprintf.o lib/ctype.o lib/string.o src/os/pcd_enumerate.o src/os/fifo.o src/os/dbgu.o src/os/led.o src/os/req_ctx.o src/os/trigger.o src/os/main.o src/os/syscalls.o src/os/usb_handler.o src/os/usb_benchmark.o src/os/tc_cdiv.o src/os/pit.o src/os/pwm.o src/os/pio_irq.o src/os/usbcmd_generic.o src/os/wdt.o src/os/blinkcode.o src/os/system_irq.o src/os/flash.o src/simtrace/iso7816_uart.o src/simtrace/tc_etu.o src/simtrace/sim_switch.o src/simtrace/spi_flash.o src/simtrace/main_simtrace.o --output main_simtrace.elf -nostartfiles -Wl,-Map=main_simtrace.map,--cref -lc -lgcc -L../../librfid//src/.libs/ -Wl,--gc-sections -Wl,--entry=_startup -Tlink/AT91SAM7S128-ROM-sam7dfu-app.ld /root/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/../lib/gcc/arm-none-eabi/4.6.1/libgcc.a(_udivsi3.o): In function `__aeabi_uidiv': (.text+0x0): multiple definition of `__udivsi3' lib/lib1funcs.o:/root/openpcd/firmware/lib/lib1funcs.S:183: first defined here /root/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/../lib/gcc/arm-none-eabi/4.6.1/libgcc.a(_udivsi3.o): In function `__aeabi_uidiv': (.text+0x0): multiple definition of `__aeabi_uidiv' lib/lib1funcs.o:/root/openpcd/firmware/lib/lib1funcs.S:183: first defined here collect2: ld returned 1 exit status make: *** [main_simtrace.elf] Error 1
On 04/05/2012 06:55 PM, Marnix Janse wrote:
Greetings to you all.
Hi again,
Can anyone point me in the right direction on what toolchain to use and help me with the make-ussues below?
I will extend the manual to point to the wiki page. Right now the best option is to build an arm-elf (no linux) toolchain yourself. This page[1] has a script that should help you to generate a working toolchain.
[1] http://bb.osmocom.org/trac/wiki/GnuArmToolchain
PS: Thunderbird didn't allow me to see the plain text version, sorry about that, your email was fine.
Marnix Janse wrote:
I tried:
- Linux-builds: CentOS 6.2 64-bitsVM, a CentOS 6.2 32-bitsVM and finally an Ubuntu 11.10 32-bits VM.
- ARM-toolchain: GNU-arm (from the Wiki) and the CodeSourcery (advised at the openpcd website)
It shouldn't take that much effort actually. Hm.
Anyway. Did you clean your build directory thoroughly between each toolchain switch? Otherwise you are mixing binary object files and that has about zero chance of working out.
//Peter
On 7 apr. 2012, at 01:35, Peter Stuge wrote:
It shouldn't take that much effort actually. Hm.
Anyway. Did you clean your build directory thoroughly between each toolchain switch? Otherwise you are mixing binary object files and that has about zero chance of working out.
Well, I like to rule out my errors before asking for help. Between every build attempts I ran "make clean". The current status is that on Ubuntu 11.10 the GNUarm from the wiki worked. Firmware was loaded via sam7. (I have 1.1p revision hw, took a while before it was in SAM-BA-mode)
The device is in DFU-mode when you see this in dmesg:
usb 2-2.2: new full speed USB device number 7 using uhci_hcd cdc_acm 2-2.2:1.0: This device cannot do calls on its own. It is not a modem. cdc_acm 2-2.2:1.0: ttyACM0: USB ACM device usbcore: registered new interface driver cdc_acm cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
The first traces were made succesfully via tcpdump. Wireshark shows the GSM11.11 packets as corrupted data. Decoding up to GSM11.11 layer is fine. This is sometning I will probably figure out myself, but any hints are welcome.
NFC-tests are part of my work package, but it looks like the board requires some shielding. The 13MHz antennas seem to disturb the operation on the simtrace-boad. Will find a solution and report back to the community.
Marnix
On 04/07/2012 10:03 AM, Marnix Janse wrote:
The device is in DFU-mode when you see this in dmesg:
s/DFU/SAM-BA/
Out of curiosity, were you forced to use SAM-BA? Somehow our expectation is that SAM-BA is only used as last resort.
NFC-tests are part of my work package, but it looks like the board requires some shielding. The 13MHz antennas seem to disturb the operation on the simtrace-boad. Will find a solution and report back to the community.
We had this topic at the OsmoDevCon2012 and the mentioned solution was: "NFC and SIMtrace FPC... interference... 13..Mhz NFC magnetic coupling -> use copper tape as shielding"
holger