Skip to content

Build system#8

Closed
pradyunnkale wants to merge 20 commits intoPurdue-Space-Program:mainfrom
pradyunnkale:build_system
Closed

Build system#8
pradyunnkale wants to merge 20 commits intoPurdue-Space-Program:mainfrom
pradyunnkale:build_system

Conversation

@pradyunnkale
Copy link
Copy Markdown
Collaborator

No description provided.

@@ -0,0 +1,115 @@
/* STM32H753ZI Memory Layout */
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Was this generated from cubeMX? it should have some setup for the board so we can use all the flash

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Nah this one was not

Comment thread hal/CMakeLists.txt
endif()
target_link_libraries(stm_hal
PRIVATE cmsis
PUBLIC cmsis
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No clue I think something else uses cmsis thats why, probably should clean up the build more

Comment thread README.md
To flash, (only available for MCU) run:
```bash
cmake -B buuld -DTARGET=<TARGET>
cmake --build build --target flash
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i think we should separate build and flash.
we can cmake --build build as usual, then ./flash.sh <build output> @CBL17 thoughts?

Comment thread CMakeLists.txt
add_subdirectory(drivers)
add_subdirectory(hal)
else()
add_subdirectory(simulations)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: simulation

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

By simulations it means simulated drivers

Comment thread CMakeLists.txt
add_subdirectory(simulations)
endif()

find_program(OPENOCD openocd)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

in the else case, can you print a warning that openocd is not available?

the reason for my below comment on making build and flash separate is that if openocd is not found, there is a silent failure and flash is not available. then, it's unclear for users why the flash fails.

vTaskDelayUntil(&xLastWakeTime, pdMS_TO_TICKS(1000));

auto time = static_cast<long long>(std::chrono::system_clock::now().time_since_epoch().count());
printf("[%lld] Hello world!\n", time);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

wouldn't be opposed to leaving printf in, but i think we'll have to setup uart hal separately.

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.

2 participants