Closed adrianbostan closed 1 year ago
Hello Which revision of Nuttx/px4 is installed? Possibly newer revisions made changes that broke compliation. Somehow builtin.c is not where it is supposed to be. Can you search to see if you actually have it somewhere?
On Oct 8, 2023 12:13 PM, Adrian Bostan @.***> wrote: Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button
Try to build the firmware on ubuntu, according to the instructions:
make[2]: Entering directory '/home/dorel/drones/apps/builtin'
arm-none-eabi-gcc: warning: /home/dorel/drones/apps/include: linker input file unused because linking not done
./exec_builtin.c:32:10: fatal error: builtin/builtin.h: No such file or directory
32 | #include "builtin/builtin.h"
| ^~~~~~~
compilation terminated.
ERROR: arm-none-eabi-gcc failed: 1
command: arm-none-eabi-gcc -MT ./exec_builtin.c.home.dorel.drones.apps.builtin.o -M '-fno-builtin' '-Wall' '-Wstrict-prototypes' '-Wshadow' '-Wundef' '-g' '-mcpu=cortex-m4' '-mthumb' '-mfpu=fpv4-sp-d16' '-mfloat-abi=hard' '-isystem' '/home/dorel/drones/nuttx/include' '-isystem' '/home/dorel/drones/nuttx/include' '-DKERNEL' '-pipe' '/home/dorel/drones/apps/include' ./exec_builtin.c
make[2]: [/home/dorel/drones/apps/Application.mk:240: .depend] Error 1
make[2]: Leaving directory '/home/dorel/drones/apps/builtin'
make[1]: [Makefile:56: /home/dorel/drones/apps/builtin_depend] Error 2
make[1]: Leaving directory '/home/dorel/drones/apps'
make: *** [tools/Makefile.unix:466: pass2dep] Error 2
— Reply to this email directly, view it on GitHubhttps://github.com/NXPHoverGames/RDDRONE-BMS772/issues/13, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACQFV7RN3RTKWFZTEY2OVLTX6LGI3AVCNFSM6AAAAAA5XY7JNCVHI2DSMVQWIX3LMV43ASLTON2WKOZRHEZTCOBYGQYDSMY. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi,
This is the nuttx version (cd apps; git checkout nuttx-12.0.0 -b bms772)
This patch also complained about something (cd apps; patch -p1 < nxp_bms/BMS_v1/Patchfiles/0001-apps-patch-BMS5.0.patch)
There is a builtin.c in /drones/nuttx/binfmt
The main reason i want to rebuild the firmware is that, ardupilot SMbus address its hardcoded to 0x0B, and UAVCAN V1 it is not supported yet in ardupilot :(
From what i can see on the BMS console: NuttShell (NSH) NuttX-12.0.0
I have tested with (cd apps; git checkout nuttx-10.0.0 -b bms772)
giving this error :
arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles (did you mean --nostartfiles ?) make[1]: *** [Makefile:172: nuttx] Error 1
Ok. I'm expecting it will be later tonight for an answer from colleagues on Europe.
On Oct 8, 2023 12:49 PM, Adrian Bostan @.***> wrote: Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button
From what i can see on the BMS console: NuttShell (NSH) NuttX-12.0.0
I have tested with (cd apps; git checkout nuttx-10.0.0 -b bms772) giving this error : arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles (did you mean --nostartfiles ?) make[1]: *** [Makefile:172: nuttx] Error 1
— Reply to this email directly, view it on GitHubhttps://github.com/NXPHoverGames/RDDRONE-BMS772/issues/13#issuecomment-1752103378, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACQFV7XRE3BQ4YRMIOYWNLTX6LKQ5AVCNFSM6AAAAAA5XY7JNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSGEYDGMZXHA. You are receiving this because you commented.Message ID: @.***>
For nuttx-10.0.0 i had to do this in order to build it.
LDFLAGS += -nostartfiles -nodefaultlibs
to
CXXFLAGS += -nostartfiles -nodefaultlibs
in every board Make.defs
But for nuttx-12.X.X it doesn't work.
For anyone who want to connect this BMS with ardupilot on SMbus you have to change the i2c address to 11 in 0001-nuttx-patch-BMS5.0.patch:
+config LPI2C0_SLAVE_ADDRESS
+ int "7-bit I2C address in decimal"
+ default 11
+ range 8 119
Hi @adrianbostan,
About the NuttX version, this example works with a specific commit. The README.md file states:
git checkout 5c3ce49d8240a13899fb5a9d93b70c50140fcd41 -b bms772
Have you tried this commit?
Kind regards,
Cis
Hi Cis,
I've followed the instructions precisely, and everything worked as expected. I'm curious if it's feasible to utilize the most recent branch of NuttX (version 12.3).
Best regards, Adrian.
The current release of the BMS772 software is targeted on NuttX 10.0. Newer releases of NuttX aren't supported by us, and might need some to work to get it to work.
Try to build the firmware on ubuntu, according to the instructions: