-
Notifications
You must be signed in to change notification settings - Fork 0
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
Execute code generation in cmake #48
base: main
Are you sure you want to change the base?
Conversation
…-H8/template-project into Code_generation_fix
…-H8/template-project into Code_generation_fix
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.
Remove the change that modifies the STLIB apth, also maybe it would be interesting if you change the base branch, and compare it with the other branch instead of with main.
@@ -4,8 +4,7 @@ | |||
"path": "." | |||
}, | |||
{ | |||
"name": "ST-LIB", | |||
"path": "../ST-LIB" | |||
"path": "../Projectos/ST-LIB" |
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 about this
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.
this doesn't affect anymore
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.
Careful! You are removing the state_machine code generation, put it back and adapt it to the new structure, it will be needed later on
CMakeLists.txt
Outdated
@@ -2,6 +2,7 @@ cmake_minimum_required (VERSION 3.14) | |||
|
|||
project (template-project ASM C CXX) | |||
set(EXECUTABLE ${PROJECT_NAME}.elf) | |||
set(Board ${PROJECT_NAME}) |
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.
set(Board ${PROJECT_NAME}) | |
set(ADJ_BOARD ${PROJECT_NAME}) |
add_custom_target(run_generator ALL | ||
COMMAND ${Python3_EXECUTABLE} ${GENERATOR_SCRIPT} ${Board} | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
) |
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.
Core/Inc/Communications/JSON_ADE
Outdated
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.
move this submodule to Code_Generation
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 would remove this file, it is no longer needed
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.
what is this file?
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.
Forget the previous review comment, but still the code is a bit hard to read, you should split all into four, one generator for data packets, another one for orders, another one for protections and another one for the state machine, and also split the generator, descriptors and templates into four. The code as is is a bit unclear and the option to just execute one generator is desirable
…/HyperloopUPV-H8/template-project into FW-301/Execute_Code_gen_on_cmake
When you build the project it should detect the name of the board and creates the generated code of the board. Needs further testing but should work.
Oops now i see that i merged the other pr into this one, but well this pr only changes 4 lines in generator.py and the cmakelist