Closed
Description
I noted the instructions:
mbed config root . && mbed deploy
mbed compile -m PORTENTA_H7_M7 -t GCC_ARM --profile=release --profile custom.json
and read the MBED Studio issue (which I am not using) so came up with this:
Install mbed-cli like this:
pip3 install -q -r https://raw.githubusercontent.com/ARMmbed/mbed-os/master/requirements.txt
python3 -m pip install -q mbed-cli
Build like this:
mbed config root -G "${repo_dir}/compilers/gcc-arm-none-eabi-7-2018-q2-update" . && mbed deploy
mbed compile -c -m GIGA -t GCC_ARM --app=mbed_app_giga_wifi.json --profile=custom.json -N mcuboot_giga_wifi
The compiler referenced is the one used in the Arduino IDE I was using, and it produces bit identical output compared with the IDE.
The result:
[Warning] main.cpp@221,12: 'MEM[(struct boot_rsp *)&rsp].br_image_off' may be used uninitialized in this function [-Wmaybe-uninitialized]
./app/main.cpp: In function 'main':
./app/main.cpp:221:12: warning: 'MEM[(struct boot_rsp *)&rsp].br_image_off' may be used uninitialized in this function [-Wmaybe-uninitialized]
uint32_t address = rsp.br_image_off + rsp.br_hdr->ih_hdr_size;
^
./app/main.cpp:210:19: note: 'MEM[(struct boot_rsp *)&rsp].br_image_off' was declared here
struct boot_rsp rsp;
^
/home/andy/code/dbc/test/compilers/gcc-arm-none-eabi-7-2018-q2-update/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv5/softfp/libc_nano.a(lib_a-calloc.o): In function `calloc':
calloc.c:(.text.calloc+0x8): undefined reference to `__wrap__calloc_r'
collect2: error: ld returned 1 exit status
[ERROR] ./app/main.cpp: In function 'main':
./app/main.cpp:221:12: warning: 'MEM[(struct boot_rsp *)&rsp].br_image_off' may be used uninitialized in this function [-Wmaybe-uninitialized]
uint32_t address = rsp.br_image_off + rsp.br_hdr->ih_hdr_size;
^
./app/main.cpp:210:19: note: 'MEM[(struct boot_rsp *)&rsp].br_image_off' was declared here
struct boot_rsp rsp;
^
/home/andy/code/dbc/test/compilers/gcc-arm-none-eabi-7-2018-q2-update/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv5/softfp/libc_nano.a(lib_a-calloc.o): In function `calloc':
calloc.c:(.text.calloc+0x8): undefined reference to `__wrap__calloc_r'
collect2: error: ld returned 1 exit status
Obviously the warnings are a bit disconcerting as they aren't suppressed in the code with a comment so I'm not sure if these are a problem. I am guessing there maybe a default initialisation assumption but not checked.
The bigger issue is the calloc link problem. Looks like it's using the nano spec, is that right?
Metadata
Metadata
Assignees
Labels
No labels