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

allow boards to supply an rc.board init #10960

Merged
merged 15 commits into from
Dec 1, 2018
Merged

allow boards to supply an rc.board init #10960

merged 15 commits into from
Dec 1, 2018

Conversation

dagar
Copy link
Member

@dagar dagar commented Nov 30, 2018

So far this saves 4 KB of flash on fmu-v2.

TODO: DATAMAN_OPT is broken in master and still broken in this PR

davids5
davids5 previously approved these changes Nov 30, 2018
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 Nice!

@dagar
Copy link
Member Author

dagar commented Dec 1, 2018

@dagar
Copy link
Member Author

dagar commented Dec 1, 2018

TODO (later): push pixracer i2c and spi resets (currently in fmu) into board init.

@dagar dagar merged commit 161cf7f into master Dec 1, 2018
@dagar dagar deleted the pr-boards_init branch December 1, 2018 15:03
@hamishwillee
Copy link
Contributor

@dagar What would you say about this in http://dev.px4.io/en/hardware/porting_guide.html ?

  • What sorts of init is done at board level
  • Where does it have to live in the build tree?

@dagar
Copy link
Member Author

dagar commented Dec 3, 2018

@hamishwillee mainly used for starting things that only exist on that particular board (sensors), but it can also be used for board default parameters and any other special cases.

FMUv5 example - https://github.com/PX4/Firmware/blob/master/boards/px4/fmu-v5/init/rc.board
You can see all the pixhawk 4 sensors being started, but it also sets a larger LOGGER_BUF, and in fresh setups (AUTOCNF section) it sets the SYS_FMU_TASK parameter.

This file is automatically included in the startup scripts if in the board directory at init/rc.board.

@bkueng
Copy link
Member

bkueng commented Dec 6, 2018

@dagar this broke HIL as rc.sensors was only executed if SYS_HITL != 1

@dagar
Copy link
Member Author

dagar commented Dec 7, 2018

Thanks @bkueng I'll fix it.

We should get something simple on Jenkins testing HITL with Gazebo if it's working reasonably well.

@bkueng bkueng mentioned this pull request Dec 12, 2018
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.

4 participants