Skip to content

Conversation

josesimoes
Copy link
Member

@josesimoes josesimoes commented Aug 24, 2021

Description

  • Major refactor of the build system.
  • Remove duplicated (or similar) CMake script or blocks.
  • Reuse macros.
  • Refactor macros to do a better use of arguments.
  • CoreCLR, native assemblies, network, debugger and wire protocol are now build as libraries.
  • Rework guard macros on all headers to follow gcc guidance on how to use.
  • Remove unused folders.

Motivation and Context

  • Clean-up the build system.
  • Have the various reusable components building as libraries to ease usage and fine tune build options.
  • Pave way for building ESP32 images with IDF 4.x.

How Has This Been Tested?

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Unit Tests (work on Unit Tests, has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

- Remove unnecessary quotes.
- Move to common location on platforms where it makes sense to do so.
- Adjusts config file call.
- Adjust path.
- Add destination path to includes.
- Update include accordingly.
- Adjusts config file call.
- Adjust path.
- Add destination path to includes.
 - Adjusts config file call.
- Adjust path.
- Add destination path to includes.
- Folder to replace with underscored name.
- Rename paths.
- Renames on docs.
- Rename NF_Networking to NF_Network.
- Rework NF_Network module to search files in known locations.
- Add nf_add_lib_network macro to allow CMakes to add network library to their builds.
- Move inclusion of platform source code files to network module.
- Remove inclusion of network related packages from common bin utils.
- Add missing include for mbedTLS and NXP sources.
- Rework NF_ADD_PLATFORM_PACKAGES and NF_ADD_PLATFORM_DEPENDENCIES to properly add and reference NF_Network library.
- Adjust network capable targets CMakes to use these changes.
- Rename macros and functions to lower case, same for their arguments. Following CMake style guide.
- Move functions in build utils module to binutils.common.
- Remove adding this package.
- Move macros in NF_Utils binutils.common.
- Add include where needed.
- Rename to NF_HALCore.
- Rework CMake to make it work.
- Rework platform CMakes to add this.
- Add call to this macro from all platform dependencies macro.
- Changed from function to macro.
- Moved common definitions (on all platforms) to nf_common_compiler_definitions.
- Add parsing and validation of args.
- Rename macro for coherence.
- Update and rework callers where needed.
- Rework CMakes accordingly.
- Add macro to setup library build.
- Update CMakes accordingly.
- Fix config and checks for UART1 on TI SimpleLink.
- Fix adding compile definitions and options on all libs to allow building for ESP32.
*** WIP for ESP32 build: can't use it as library because of the serious deviation from other targets build system***
- It's now a macro.
- Add parameters to process target and optionally link map file and extra link flags.
- Rework caller CMakes accordingly.
- Remove settings for source files.
- Remove unnecessary add of compile definitions (now added through nf_set_compile_definitions).
- This is now a common macro.
- Remove call to it from nf_set_linker_options.
- Add call to to targets CMakes.
- Remove extraneous argument from libray builds.
- Add missing stubs or source files that weren't being added to the "main" target just to the libaries.
- This macro adds libraries to the linker call.
- Rework options modules to call it.
- Remove macro and update CMakes accordingly.
- Remove commented lines.
- Adjust adding files required for both booter and CLR.
- Add linker options for libraries based on build options.
- Remove wrong inclusions of libs in ESP32 CMake.
- Now RTOS has to be defined, ChibiOS is not the default anymore.
- Tweak output messages.
- Remove duplicated and unnecessary entries.
- Remove duplicate generation of target_platform.h files.
- Update CMakes accordingly. (except ESP32 has it doesn't like the change).
- Rework sys config targets to have the files generated and copied in the correct order.
- Fix nf_add_platform_packages macro to match other platforms.
- Is now a macro.
- Add arguments with target and extra compile options.
- Required to solve issues caused by overwriting variables between macros.
- Building a target is now much simpler with less parameters and configurations required.
- Add empty CMake files to NXP to satisfy build system.
- Add macro to incorporate them in the build.
- Add dependency on WireProtocol library
- Update CMakes accordingly.
- No plans to use this anymore, just taking up space.
- Following gcc docs on optimizations and pattern expected by the compiler.
(https://gcc.gnu.org/onlinedocs/gcc-11.2.0/cpp/Once-Only-Headers.html#Once-Only-Headers)
@josesimoes josesimoes merged commit 1e8defc into develop Aug 24, 2021
@josesimoes josesimoes deleted the develop-rework-build-system branch August 24, 2021 13:31
josesimoes added a commit to Eclo/nf-Community-Targets that referenced this pull request Aug 24, 2021
josesimoes added a commit to nanoframework/nf-Community-Targets that referenced this pull request Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants