-
Notifications
You must be signed in to change notification settings - Fork 335
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
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
# 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 | ||
) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
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. |
Perfect, I just wanted to double check.
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 ? |
There was a problem hiding this 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.
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 |
I'll replace this with an updated version using the same architecture as blinky as soon as all dependencies were merged |
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
andh743zi
and moved the existing example into thef407vg
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.