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

NuttX upgrade split UAVCAN bootloaders into separate repository #7878

Merged
merged 1 commit into from
Sep 4, 2017

Conversation

dagar
Copy link
Member

@dagar dagar commented Aug 30, 2017

New repos (would move to PX4 org)
https://github.com/dagar/bootloaders_uavcan
https://github.com/dagar/uavcan_board_ident

Duplicated between Firmware and bootloaders_uavcan

  • nuttx defconfig
  • boot_app_shared.c and boot_app_shared.c
  • uavcan board identity is shareed via a new repository included in both Firmware and bootloaders_uavcan

@davids5
Copy link
Member

davids5 commented Aug 31, 2017

@dagar - some feedback

I tested px4esc-v1 and it works. So I would assume, that all should

Some minor issues:

The git hash it was tied to was not in repo I checked out the px4_nuttx-master - it is building

.gitignore list_config_targets needs .project .cproject .settings

Make is tad broken:

$ make list_config_targets
/bin/sh: -c: line 0: syntax error near unexpected token `)'
/bin/sh: -c: line 0: `for targ in esc35-v1 px4cannode-v1 px4esc-v1 px4flow-v2 s2740vc-v1 zubaxgnss-v1) do echo $targ; done'
make: *** [list_config_targets] Error 1

I needed debug symbols, can not set build type from command line
CMAKE_BUILD_TYPE=RelWithDebInfo make
would not work

make clean
CMAKE_BUILD_TYPE=RelWithDebInfo make
-- The ASM compiler identification is GNU
-- Found assembler: /usr/lib64/ccache/arm-none-eabi-gcc
-- PX4 NuttX bootloader: esc35-v1 cortex-m4
-- Build Type: MinSizeRel
-- Configuring done
-- Generating done
-- Build files have been written to: /home/david_s5/Desktop/dev/PX4/repos/mainline/bootloaders_uavcan/build/esc35-v1
[1/28] Copying NuttX/nuttx to 

I had to edit cmake to get RelWithDebInfo but then px4cannode-v1 will not fit :(.
It use to only overflow by 18 bytes. So something more may be up.

-- The ASM compiler identification is GNU
-- Found assembler: /usr/lib64/ccache/arm-none-eabi-gcc
-- PX4 NuttX bootloader: px4cannode-v1 cortex-m3
-- Build Type: RelWithDebInfo
-- Configuring done
-- Generating done
-- Build files have been written to: 
bootloaders_uavcan/build/px4cannode-v1
[28/28] Linking C executable px4cannode-v1.elf
FAILED: : && /usr/lib64/ccache/arm-none-eabi-gcc  -mcpu=cortex-m3 -mthumb -march=armv7-m -O2 -g -DNDEBUG  -mcpu=cortex-m3 -mthumb -march=armv7-m -flto -nodefaultlibs -nostdlib -Wl,--warn-common,--gc-sections CMakeFiles/px4cannode-v1.elf.dir/configs/px4cannode-v1/nuttx-config/src/empty.c.obj  -o px4cannode-v1.elf  -T/home/david_s5/Desktop/dev/PX4/repos/mainline/bootloaders_uavcan/configs/px4cannode-v1/nuttx-config/scripts/ld.script -Wl,-Map=/home/david_s5/Desktop/dev/PX4/repos/mainline/bootloaders_uavcan/build/px4cannode-v1/px4cannode-v1.map -Wl,-wrap,sched_process_timer -Wl,-wrap,sem_post -Wl,-wrap,sem_wait -Wl,--warn-common -Wl,--gc-sections -Wl,--start-group configs/px4cannode-v1/libpx4cannode-v1.a src/libdrivers_bootloaders.a nuttx/arch/arm/src/libarch.a nuttx/configs/px4cannode-v1/src/libboard.a nuttx/libc/libc.a nuttx/sched/libsched.a libnuttx_startup.a -Wl,--end-group && :
/home/david_s5/gcc-arm-none-eabi-5_4-2016q2/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: px4cannode-v1.elf section `.text' will not fit in region `flash'
/home/david_s5/gcc-arm-none-eabi-5_4-2016q2/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: region `flash' overflowed by 523 bytes
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
make: *** [px4cannode-v1] Error 1

Copy link
Member

@davids5 davids5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dagar see comments.

@dagar
Copy link
Member Author

dagar commented Aug 31, 2017

It was building MinSizeRel (-Os), RelWithDebInfo is actually -O2. Like with firmware I'll keep it at MinSizeRel, but manually add -g.

Does it actually need the nuttx patches? Whatever we point nuttx at should have a corresponding branch.

I'll update .gitignore and try to fix Make magic.

@davids5
Copy link
Member

davids5 commented Aug 31, 2017

@davids5
Copy link
Member

davids5 commented Aug 31, 2017

Does it actually need the nuttx patches? Whatever we point nuttx at should have a corresponding branch.

I am on the fence. If an upstream change breaks uavcan BL, it means I most likely need to check why thing grew. But on the other hand, locking down to a version that works - may be be good enough.

We could also tie it to a new branch px4_nuttx-uavcan_bootloaders and fix the one commit that made it not fit.

@dagar
Copy link
Member Author

dagar commented Aug 31, 2017

Try https://github.com/dagar/bootloaders_uavcan again. I think I've addressed everything.

   text    data     bss     dec     hex filename
   8159       4    5144   13307    33fb build/esc35-v1/esc35-v1.elf
   8571       4    4240   12815    320f build/px4esc-v1/px4esc-v1.elf
   7967       4    3944   11915    2e8b build/px4cannode-v1/px4cannode-v1.elf
   7735       4    4120   11859    2e53 build/s2740vc-v1/s2740vc-v1.elf
   8495       4    4160   12659    3173 build/px4flow-v2/px4flow-v2.elf
   7936       6    4008   11950    2eae build/zubaxgnss-v1/zubaxgnss-v1.elf

@davids5
Copy link
Member

davids5 commented Aug 31, 2017

@dagar debuggable and fits.

   text    data     bss     dec     hex filename
   8333       1    5332   13666    3562 build/esc35-v1/esc35-v1.elf
   8141       1    4132   12274    2ff2 build/px4cannode-v1/px4cannode-v1.elf
   8751       1    4428   13180    337c build/px4esc-v1/px4esc-v1.elf
   8679       1    4348   13028    32e4 build/px4flow-v2/px4flow-v2.elf
   7949       1    4304   12254    2fde build/s2740vc-v1/s2740vc-v1.elf
   8120       3    4224   12347    303b build/zubaxgnss-v1/zubaxgnss-v1.elf

@davids5 davids5 force-pushed the master_new_archs_nuttx_upgrade branch 2 times, most recently from 40ede1e to bbd6f7d Compare September 1, 2017 03:18
@dagar
Copy link
Member Author

dagar commented Sep 4, 2017

I'll remove bootloaders from semaphore and rebase.

@dagar
Copy link
Member Author

dagar commented Sep 4, 2017

PX4 org repositories created.
https://github.com/PX4/UAVCAN_Bootloaders
https://github.com/PX4/uavcan_board_ident

We should add a README, LICENSE, git description. Anything else?

@dagar dagar changed the title [WIP] NuttX upgrade split UAVCAN bootloaders into separate repository NuttX upgrade split UAVCAN bootloaders into separate repository Sep 4, 2017
@dagar dagar merged commit 27af3fe into PX4:master_new_archs_nuttx_upgrade Sep 4, 2017
@dagar dagar deleted the pr-bootloaders branch September 4, 2017 17:33
dagar added a commit that referenced this pull request Apr 19, 2020
 - essentially reverting #7878 minus the obsolete board support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants