Skip to content

Commit

Permalink
Remove support for avr-libcpp injection (#988)
Browse files Browse the repository at this point in the history
Resolves #987 (Remove support for avr-libcpp injection).
  • Loading branch information
apcountryman authored Feb 27, 2024
1 parent db878e5 commit eaef140
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 51 deletions.
20 changes: 3 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,25 +80,11 @@ if( "${PROJECT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}" )
endif( "${PROJECT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}" )

# configure avr-libcpp
option(
PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_AVRLIBCPP
"picolibrary-microchip-megaavr0: use parent project's avr-libcpp"
ON
)

if( NOT ${PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_AVRLIBCPP} )
set( AVRLIBCPP_SUPPRESS_SFR_MACROS ON CACHE INTERNAL "" )
endif( NOT ${PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_AVRLIBCPP} )

if( NOT ${AVRLIBCPP_SUPPRESS_SFR_MACROS} )
message( FATAL_ERROR "AVRLIBCPP_SUPPRESS_SFR_MACROS must be ON" )
endif( NOT ${AVRLIBCPP_SUPPRESS_SFR_MACROS} )
set( AVRLIBCPP_SUPPRESS_SFR_MACROS ON CACHE INTERNAL "" )

if( NOT ${PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_AVRLIBCPP} )
add_subdirectory( avr-libcpp )
add_subdirectory( avr-libcpp )

link_libraries( avr-libcpp )
endif( NOT ${PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_AVRLIBCPP} )
link_libraries( avr-libcpp )

# configure picolibrary
option(
Expand Down
3 changes: 0 additions & 3 deletions configuration/release-atmega1608/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ set( CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "" )
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_F_CPU "16000000UL" CACHE INTERNAL "" )
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_MCU "atmega1608" CACHE INTERNAL "" )

# avr-libcpp configuration
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_AVRLIBCPP OFF CACHE INTERNAL "" )

# picolibrary configuration
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_PICOLIBRARY OFF CACHE INTERNAL "" )
set( PICOLIBRARY_SUPPRESS_ASSERTION_FAILURE_LOCATION_INFORMATION OFF CACHE INTERNAL "" )
Expand Down
3 changes: 0 additions & 3 deletions configuration/release-atmega1609/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ set( CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "" )
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_F_CPU "16000000UL" CACHE INTERNAL "" )
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_MCU "atmega1609" CACHE INTERNAL "" )

# avr-libcpp configuration
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_AVRLIBCPP OFF CACHE INTERNAL "" )

# picolibrary configuration
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_PICOLIBRARY OFF CACHE INTERNAL "" )
set( PICOLIBRARY_SUPPRESS_ASSERTION_FAILURE_LOCATION_INFORMATION OFF CACHE INTERNAL "" )
Expand Down
3 changes: 0 additions & 3 deletions configuration/release-atmega3208/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ set( CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "" )
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_F_CPU "16000000UL" CACHE INTERNAL "" )
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_MCU "atmega3208" CACHE INTERNAL "" )

# avr-libcpp configuration
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_AVRLIBCPP OFF CACHE INTERNAL "" )

# picolibrary configuration
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_PICOLIBRARY OFF CACHE INTERNAL "" )
set( PICOLIBRARY_SUPPRESS_ASSERTION_FAILURE_LOCATION_INFORMATION OFF CACHE INTERNAL "" )
Expand Down
3 changes: 0 additions & 3 deletions configuration/release-atmega3209/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ set( CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "" )
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_F_CPU "16000000UL" CACHE INTERNAL "" )
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_MCU "atmega3209" CACHE INTERNAL "" )

# avr-libcpp configuration
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_AVRLIBCPP OFF CACHE INTERNAL "" )

# picolibrary configuration
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_PICOLIBRARY OFF CACHE INTERNAL "" )
set( PICOLIBRARY_SUPPRESS_ASSERTION_FAILURE_LOCATION_INFORMATION OFF CACHE INTERNAL "" )
Expand Down
3 changes: 0 additions & 3 deletions configuration/release-atmega4808/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ set( CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "" )
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_F_CPU "16000000UL" CACHE INTERNAL "" )
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_MCU "atmega4808" CACHE INTERNAL "" )

# avr-libcpp configuration
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_AVRLIBCPP OFF CACHE INTERNAL "" )

# picolibrary configuration
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_PICOLIBRARY OFF CACHE INTERNAL "" )
set( PICOLIBRARY_SUPPRESS_ASSERTION_FAILURE_LOCATION_INFORMATION OFF CACHE INTERNAL "" )
Expand Down
3 changes: 0 additions & 3 deletions configuration/release-atmega4809/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ set( CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "" )
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_F_CPU "16000000UL" CACHE INTERNAL "" )
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_MCU "atmega4809" CACHE INTERNAL "" )

# avr-libcpp configuration
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_AVRLIBCPP OFF CACHE INTERNAL "" )

# picolibrary configuration
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_PICOLIBRARY OFF CACHE INTERNAL "" )
set( PICOLIBRARY_SUPPRESS_ASSERTION_FAILURE_LOCATION_INFORMATION OFF CACHE INTERNAL "" )
Expand Down
3 changes: 0 additions & 3 deletions configuration/release-atmega808/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ set( CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "" )
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_F_CPU "16000000UL" CACHE INTERNAL "" )
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_MCU "atmega808" CACHE INTERNAL "" )

# avr-libcpp configuration
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_AVRLIBCPP OFF CACHE INTERNAL "" )

# picolibrary configuration
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_PICOLIBRARY OFF CACHE INTERNAL "" )
set( PICOLIBRARY_SUPPRESS_ASSERTION_FAILURE_LOCATION_INFORMATION OFF CACHE INTERNAL "" )
Expand Down
3 changes: 0 additions & 3 deletions configuration/release-atmega809/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ set( CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "" )
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_F_CPU "16000000UL" CACHE INTERNAL "" )
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_MCU "atmega809" CACHE INTERNAL "" )

# avr-libcpp configuration
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_AVRLIBCPP OFF CACHE INTERNAL "" )

# picolibrary configuration
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_PICOLIBRARY OFF CACHE INTERNAL "" )
set( PICOLIBRARY_SUPPRESS_ASSERTION_FAILURE_LOCATION_INFORMATION OFF CACHE INTERNAL "" )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ set( CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "" )
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_F_CPU "16000000UL" CACHE INTERNAL "" )
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_MCU "atmega4809" CACHE INTERNAL "" )

# avr-libcpp configuration
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_AVRLIBCPP OFF CACHE INTERNAL "" )

# picolibrary configuration
set( PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_PICOLIBRARY OFF CACHE INTERNAL "" )
set( PICOLIBRARY_SUPPRESS_ASSERTION_FAILURE_LOCATION_INFORMATION OFF CACHE INTERNAL "" )
Expand Down
7 changes: 0 additions & 7 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,9 @@ picolibrary-microchip-megaavr0 supports the following project configuration opti
USART clock generator scaling factor (see
[`include/picolibrary/testing/interactive/microchip/megaavr0/log.h`](https://github.com/apcountryman/picolibrary-microchip-megaavr0/blob/main/include/picolibrary/testing/interactive/microchip/megaavr0/log.h)
for more information)
- `PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_AVRLIBCPP` (defaults to `ON`): use
parent project's avr-libcpp
- `PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_PICOLIBRARY` (defaults to `ON`): use
parent project's picolibrary

### avr-libcpp Configuration Requirements
If `PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_AVRLIBCPP` is `ON`, avr-libcpp must
be configured as follows:
- `AVRLIBCPP_SUPPRESS_SFR_MACROS` must be `ON`

### picolibrary Configuration Requirements
If `PICOLIBRARY_MICROCHIP_MEGAAVR0_USE_PARENT_PROJECT_PICOLIBRARY` is `ON`, picolibrary
must be configured as follows:
Expand Down

0 comments on commit eaef140

Please sign in to comment.