micro_ros_platformio icon indicating copy to clipboard operation
micro_ros_platformio copied to clipboard

Add stm32cube framework

Open bjsowa opened this issue 3 years ago • 7 comments

I tested it only on F4. Also I haven't tested the rollover feature, because I don't know how to do it without running the code for 50 days.

bjsowa avatar Jul 25 '22 13:07 bjsowa

This looks good to me.

Could you provide some transport layer such as basic serial transport using STM HAL?

Also, could you integrate this into the CI? https://github.com/micro-ROS/micro_ros_platformio/blob/c9c410c9c7b93cca685cd19786978b0589f23ad9/.github/workflows/ci.yml#L17

pablogs9 avatar Jul 26 '22 05:07 pablogs9

@mergify backport humble foxy galactic

pablogs9 avatar Jul 26 '22 05:07 pablogs9

backport humble foxy galactic

🟠 Waiting for conditions to match

  • [ ] merged [📌 backport requirement]

mergify[bot] avatar Jul 26 '22 05:07 mergify[bot]

Also, could you integrate this into the CI?

I would integrate it with CI but I would need some help. For starters, I have a few questions:

  1. Should I split the ci project into 2 projects (for example: ci/arduino and ci/stm32cube) to separate the code for different frameworks?
  2. Which boards should I choose for the CI?
  3. Should the code be actually functional when flashed to the board or is it enough if it compiles? The stm32cube HAL requires a lot of boilerplate code for setting clocks, peripherals, etc. In my project, I use Stm32CubeMX (through stm32pio) to genarate this code, but I'm not sure how it would work here.

bjsowa avatar Aug 01 '22 10:08 bjsowa

Should I split the ci project into 2 projects (for example: ci/arduino and ci/stm32cube) to separate the code for different frameworks?

Maybe you can add a target here. But if you need to create another folder, it is ok for us.

Which boards should I choose for the CI?

Maybe for initial support, we can add a board that you as a contributor can confirm that works. Just add the needed references in the README.md specifying that this has been tested in X hardware.

Should the code be actually functional when flashed to the board or is it enough if it compiles? The stm32cube HAL requires a lot of boilerplate code for setting clocks, peripherals, etc. In my project, I use Stm32CubeMX (through stm32pio) to generate this code, but I'm not sure how it would work here.

In general, if support for one platform/hardware is added, another user should be able to use it. If your contribution requires further steps to make a basic micro-ROS application works, feel free to add a section in the README.md explaining the dependencies and required steps for making in work.

pablogs9 avatar Aug 01 '22 11:08 pablogs9

I added an example project and CI job. I didn't want to include generated code so I added a step in CI job that installs CubeMX and stm32pio which I use to generate the code before running platformio. The example project works on my custom board. Adding another boards should be fairly easy as it should be only a matter of creating a properly configured .ioc project for the board. I don't have any other boards at hand unfortunately. @pablogs9 any comments?

bjsowa avatar Aug 04 '22 16:08 bjsowa

@Acuadros95 please review

pablogs9 avatar Aug 05 '22 06:08 pablogs9