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

Added example for h743zi board #206

Closed
wants to merge 6 commits into from

Conversation

robamu
Copy link
Contributor

@robamu robamu commented Jun 8, 2021

I think an example for a H7 board using C++ would be useful. I struggled a bit with the M4/M7 part (well, I should have read the documentation better, I still think an example would be useful). I added that example and tested it on my H743ZI-Nucleo board.

I created two new folder f407vg and h743zi and moved the existing example into the f407vg folder. It would make sense to merge this after #205 (replaces #203) because the printout function is used (it is commented though). I added the print function because I think this is a very useful utility to include in the examples.

Copy link
Collaborator

@atsju atsju left a comment

Choose a reason for hiding this comment

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

Could we use same architecture as in blinky example ? I mean with same files for all boards and just 2 targets in same cmakelist.

@rmspacefish Can you please confirm: did you have a chance to try out the code on targeted board ?


project(stm32-freertos C ASM)
set(CMAKE_INCLUDE_CURRENT_DIR TRUE)

# Can be used to print out all devices for the F4 family
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note to reviewer: remember to see #205 first

project(${TARGET_NAME} CXX C ASM)
set(CMAKE_INCLUDE_CURRENT_DIR TRUE)

# Can be used to print out all devices for the H7 family
Copy link
Collaborator

@atsju atsju Jun 26, 2021

Choose a reason for hiding this comment

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

Note to reviewer: remember to see #205 first

Comment on lines 41 to 47
# Generate a binary file which allows flashing the STM32 board via drag-and-drop
add_custom_command(
TARGET ${TARGET_NAME}
POST_BUILD
COMMAND echo Generating binary file ${CMAKE_PROJECT_NAME}.bin..
COMMAND ${CMAKE_OBJCOPY} -O binary ${TARGET_NAME}.elf ${TARGET_NAME}.bin
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure this should be here. Let's keep each example minimal. But if it's useful we could either always generate elf/hex/bin OR create a function to do it depending on user needs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I added a function in another PR, but I do not use it yet. I can remove it to keep it more minimal

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will be replaced by calls to #221 so this should probably be merged first

@atsju atsju requested a review from Hish15 June 26, 2021 15:14
@robamu
Copy link
Contributor Author

robamu commented Jun 26, 2021

This code ran on my H743ZI Nucleo board successfully. I can have a look at the blinky example. However, I think it was a bit of a hassle because I had to clone two cube repositories.. I think it's more useful if the example focuses on one architecture. This example also uses C++ when compared to the other examples.

@atsju
Copy link
Collaborator

atsju commented Jun 27, 2021

This code ran on my H743ZI Nucleo board successfully.

Perfect, I just wanted to double check.

I can have a look at the blinky example. However, I think it was a bit of a hassle because I had to clone two cube repositories.. I think it's more useful if the example focuses on one architecture. This example also uses C++ when compared to the other examples.

I understand the point (I just commented out the unwanted targets and I suppose I can compile just 1 target instead the all target) @Hish15 What do you think about it ?

Copy link
Collaborator

@Hish15 Hish15 left a comment

Choose a reason for hiding this comment

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

Seems good to me.

@robamu
Copy link
Contributor Author

robamu commented Jul 3, 2021

I will merge the 2 folder together again as suggested in #225 . However, this is a major change, and I would like to also provide CMSIS RTOS/RTOSV2 examples when merging them, so it would be a good idea to still merge this. If you want to skip this PR, I can also create a PR for the updated example, but this will require #222 and #190 first

@robamu
Copy link
Contributor Author

robamu commented Jul 4, 2021

I'll replace this with an updated version using the same architecture as blinky as soon as all dependencies were merged

@robamu robamu closed this Jul 4, 2021
@robamu robamu deleted the mueller/freertos-examples branch August 8, 2021 13:51
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

Successfully merging this pull request may close these issues.

3 participants