Closed douardda closed 4 years ago
In this revision e4fecad7 the atoi call is replaced by atoll, but the atoll symbol seems not available in the bootloader image:
david@pavo:~/embed/nanovna/NanoVNA-V2-firmware/bootloader$ make CXX main.cpp arm-none-eabi-g++ -Os -g --std=c++0x -fno-exceptions -fno-rtti -I../mculib/include -DMCULIB_DEVICE_STM32F103 -DSTM32F103 -DSTM32F1 -D_XOPEN_SOURCE=600 -DGD32F3 -DGD32F303CC -I../libopencm3/include -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -o main.o -c main.cpp CXX ../common.cpp arm-none-eabi-g++ -Os -g --std=c++0x -fno-exceptions -fno-rtti -I../mculib/include -DMCULIB_DEVICE_STM32F103 -DSTM32F103 -DSTM32F1 -D_XOPEN_SOURCE=600 -DGD32F3 -DGD32F303CC -I../libopencm3/include -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -o ../common.o -c ../common.cpp CXX ../command_parser.cpp arm-none-eabi-g++ -Os -g --std=c++0x -fno-exceptions -fno-rtti -I../mculib/include -DMCULIB_DEVICE_STM32F103 -DSTM32F103 -DSTM32F1 -D_XOPEN_SOURCE=600 -DGD32F3 -DGD32F303CC -I../libopencm3/include -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -o ../command_parser.o -c ../command_parser.cpp CXX ../stream_fifo.cpp arm-none-eabi-g++ -Os -g --std=c++0x -fno-exceptions -fno-rtti -I../mculib/include -DMCULIB_DEVICE_STM32F103 -DSTM32F103 -DSTM32F1 -D_XOPEN_SOURCE=600 -DGD32F3 -DGD32F303CC -I../libopencm3/include -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -o ../stream_fifo.o -c ../stream_fifo.cpp CXX ../mculib/fastwiring.cpp arm-none-eabi-g++ -Os -g --std=c++0x -fno-exceptions -fno-rtti -I../mculib/include -DMCULIB_DEVICE_STM32F103 -DSTM32F103 -DSTM32F1 -D_XOPEN_SOURCE=600 -DGD32F3 -DGD32F303CC -I../libopencm3/include -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -o ../mculib/fastwiring.o -c ../mculib/fastwiring.cpp CXX ../mculib/usbserial.cpp arm-none-eabi-g++ -Os -g --std=c++0x -fno-exceptions -fno-rtti -I../mculib/include -DMCULIB_DEVICE_STM32F103 -DSTM32F103 -DSTM32F1 -D_XOPEN_SOURCE=600 -DGD32F3 -DGD32F303CC -I../libopencm3/include -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -o ../mculib/usbserial.o -c ../mculib/usbserial.cpp LD binary.elf arm-none-eabi-gcc main.o ../common.o ../command_parser.o ../stream_fifo.o ../mculib/fastwiring.o ../mculib/usbserial.o -Wl,--start-group -lgcc -lnosys -Wl,--end-group -lm -lopencm3_gd32f3 -static -nostartfiles -nostdlib -Wl,--print-memory-usage -L../libopencm3/lib -T./gd32f303cc.ld -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -o binary.elf Memory region Used Size Region Size %age Used ram: 17452 B 48 KB 35.51% rom: 14564 B 256 KB 5.56% /usr/lib/gcc/arm-none-eabi/7.3.1/../../../arm-none-eabi/bin/ld: ../common.o: in function `my_atof(char const*)': /home/david/embed/nanovna/NanoVNA-V2-firmware/bootloader/../common.cpp:44: undefined reference to `atoll' collect2: error: ld returned 1 exit status make: *** [../libopencm3/mk/gcc-rules.mk:44: binary.elf] Error 1 rm ../mculib/usbserial.o ../mculib/fastwiring.o ../common.o main.o ../command_parser.o ../stream_fifo.o
looks like atoi in the bootloader is an empty shell (defined in main.c) so I guess a similar one should be added for atoll.
In this revision e4fecad7 the atoi call is replaced by atoll, but the atoll symbol seems not available in the bootloader image: