Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiled binary.bin cannot work #35

Open
antboy1979 opened this issue Aug 15, 2020 · 10 comments
Open

compiled binary.bin cannot work #35

antboy1979 opened this issue Aug 15, 2020 · 10 comments

Comments

@antboy1979
Copy link

I followed with the guide in https://github.com/nanovna/NanoVNA-V2-firmware and compiled the binary.bin , but I found its size (94,716 bytes) different with binary-ili9341.bin(94,780 bytes) ,witch can be
download from https://github.com/nanovna/NanoVNA-V2-firmware/releases. When I use NanoVNA-QT flash the binary.bin, NanoVNA-V2 cannot work.

@gabriel-tenma-white
Copy link
Collaborator

Check that your linker script gd32f303cc_with_bootloader.ld wasn't overwritten, and try git --reset hard gd32f303cc_with_bootloader.ld

@antboy1979
Copy link
Author

gabriel-tenma-white, thanks for your reply. Can you tell me more detailly what I should do for this problem, I am a newer for ARM toolchains.

@gabriel-tenma-white
Copy link
Collaborator

git reset --hard gd32f303cc_with_bootloader.ld

@antboy1979
Copy link
Author

thans much. The problem has been solved. I just used command 'git reset --hard' , 'sudo make clean', 'sudo make' step by step. There are some erros in main2.cpp:219:25 , 'assignment of read-only variable', I deleted line 218 and 219, then the command ' sudo make' can work correctly. the I get the new binary.bin( size is 98420 bytes), it can work after flash into NanoNVA-V2. thanks a lot again, best regards!

@douardda
Copy link
Contributor

You should not have to use sudo to build the firmware (no need to have root privileges for that). This read-only variable assignment should be investigated however.

Also the linker script stuff should be made a bit more reliable.

@lzqgdt
Copy link

lzqgdt commented Aug 25, 2020

i got same problem , and tried git reset to reset gd32f303cc_with_bootloader.ld .
my build option after make is :
--start-group -lgcc -lnosys -Wl,--end-group -lm -lopencm3_gd32f3_nofpu -static -nostartfiles -Wl,--exclude-libs,libssp -Wl,--print-memory-usage -Wl,--gc-sections -Llibopencm3/lib -T./gd32f303cc_with_bootloader.ld -mcpu=cortex-m4 -mthumb -msoft-float

@lzqgdt
Copy link

lzqgdt commented Aug 25, 2020

i got same problem , and tried git reset to reset gd32f303cc_with_bootloader.ld .
my build option after make is :
--start-group -lgcc -lnosys -Wl,--end-group -lm -lopencm3_gd32f3_nofpu -static -nostartfiles -Wl,--exclude-libs,libssp -Wl,--print-memory-usage -Wl,--gc-sections -Llibopencm3/lib -T./gd32f303cc_with_bootloader.ld -mcpu=cortex-m4 -mthumb -msoft-float

Oh, it is working after full reset the project . just do the git reset --hard

@nieldk
Copy link

nieldk commented Sep 2, 2020

You should not have to use sudo to build the firmware (no need to have root privileges for that). This read-only variable assignment should be investigated however.

Also the linker script stuff should be made a bit more reliable.

for that error, see issue #32, it seems to be mculib

@douardda
Copy link
Contributor

douardda commented Sep 5, 2020

FTR I've just rebuilt a working version of the firmware (ili9341 version) that seems to work ok, but had to apply gabriel-tenma-white/mculib#3 to make it compile fine (which is the generalisation of @nieldk proposition to all "config" member variables).

@Jampag
Copy link

Jampag commented Oct 8, 2022

Hi,
I solved it like this:
1-Clone the correct repository for NanoVNA V2 support only 20201013

git clone --branch 20201013 https://github.com/nanovna/NanoVNA-V2-firmware.git

2-Check if it has downloaded these directories as well 'libopencm3' e 'mculib'

3-Check this file 'NanoVNA-V2-firmware/libopencm3/Makefile' on line 27 there must be
SRCLIBDIR:= $(subst $(space),$(space),$(realpath lib))

4-Try this make comand

cd NanoVNA-V2-firmware
make BOARDNAME=board_v2_2 EXTRA_CFLAGS="-DSWEEP_POINTS_MAX=201 -DSAVEAREA_MAX=7"

or

make -j4 BOARDNAME=board_v2_plus EXTRA_CFLAGS="-DSWEEP_POINTS_MAX=201 -DSAVEAREA_MAX=7" LDSCRIPT=./gd32f303cc_with_bootloader.ld

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants