Skip to content

Commit

Permalink
feat: CMake package definition without tool specification
Browse files Browse the repository at this point in the history
  • Loading branch information
josepablo134 committed Mar 14, 2023
1 parent a9b63e5 commit e2de74f
Show file tree
Hide file tree
Showing 233 changed files with 1,081,683 additions and 12 deletions.
19 changes: 19 additions & 0 deletions BUS8080/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
################################################################################
# @file CMakeLists.txt
# @author Josepablo C (josepablo134@gmail.com)
################################################################################
set(COMPONENT_NAME BUS8080)
set(TIVAC_MODEL TivaCTM4C1294)

add_library(${COMPONENT_NAME}_${TIVAC_MODEL} STATIC
${CMAKE_CURRENT_LIST_DIR}/src/${TIVAC_MODEL}/Driver8080.c
)

target_include_directories(${COMPONENT_NAME}_${TIVAC_MODEL} PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include
)

add_library(${COMPONENT_NAME}::${TIVAC_MODEL} ALIAS ${COMPONENT_NAME}_${TIVAC_MODEL})

target_link_libraries( ${COMPONENT_NAME}_${TIVAC_MODEL} TivaWare )

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ int Driver8080_ioctl( unsigned int config , void* buffer ){
ENABLE_BUS();
SET_BUS_OUTPUT();
CMD_MODE();
for( counter=0; counter < config & Driver8080_IOCTL_DATA_MASK; counter++){
for( counter=0; counter < (config & Driver8080_IOCTL_DATA_MASK); counter++){
STROBE_WR_INIT();
SET_DATA( ((uint8_t*)buffer)[counter] );
STROBE_WR();
Expand All @@ -149,7 +149,7 @@ int Driver8080_ioctl( unsigned int config , void* buffer ){
ENABLE_BUS();
SET_BUS_OUTPUT();
CMD_MODE();
for( counter=0; counter < config & Driver8080_IOCTL_DATA_MASK; counter++){
for( counter=0; counter < (config & Driver8080_IOCTL_DATA_MASK); counter++){
STROBE_WR_INIT();
SET_DATA( ((uint8_t*)buffer)[counter] );
STROBE_WR();
Expand Down
21 changes: 21 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
################################################################################
# @file CMakeLists.txt
# @author Josepablo C (josepablo134@gmail.com)
################################################################################
set(COMPONENT_NAME MicroMiddlewares)
set(TIVAC_MODEL TivaCTM4C1294)

add_subdirectory( ${CMAKE_CURRENT_LIST_DIR}/TivaWare )
add_subdirectory( ${CMAKE_CURRENT_LIST_DIR}/I2C )
add_subdirectory( ${CMAKE_CURRENT_LIST_DIR}/SPI )

add_subdirectory( ${CMAKE_CURRENT_LIST_DIR}/BUS8080 )

add_subdirectory( ${CMAKE_CURRENT_LIST_DIR}/ILI9341 )
add_subdirectory( ${CMAKE_CURRENT_LIST_DIR}/SSD1306 )
add_subdirectory( ${CMAKE_CURRENT_LIST_DIR}/MCP2515 )

add_subdirectory( ${CMAKE_CURRENT_LIST_DIR}/Misc )
add_subdirectory( ${CMAKE_CURRENT_LIST_DIR}/simpleGFX )
add_subdirectory( ${CMAKE_CURRENT_LIST_DIR}/System )

20 changes: 20 additions & 0 deletions I2C/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
################################################################################
# @file CMakeLists.txt
# @author Josepablo C (josepablo134@gmail.com)
################################################################################
set(COMPONENT_NAME I2C)
set(TIVAC_MODEL TivaCTM4C1294)

add_library(${COMPONENT_NAME}_${TIVAC_MODEL} STATIC
${CMAKE_CURRENT_LIST_DIR}/src/${TIVAC_MODEL}/Driver${COMPONENT_NAME}.c
${CMAKE_CURRENT_LIST_DIR}/src/${TIVAC_MODEL}/Driver${COMPONENT_NAME}_config.c
)

target_include_directories(${COMPONENT_NAME}_${TIVAC_MODEL} PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include
)

add_library(${COMPONENT_NAME}::${TIVAC_MODEL} ALIAS ${COMPONENT_NAME}_${TIVAC_MODEL})

target_link_libraries( ${COMPONENT_NAME}_${TIVAC_MODEL} TivaWare )

File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions ILI9341/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
################################################################################
# @file CMakeLists.txt
# @author Josepablo C (josepablo134@gmail.com)
################################################################################
set(COMPONENT_NAME ILI9341)
set(TIVAC_MODEL TivaCTM4C1294)

add_library(${COMPONENT_NAME}_${TIVAC_MODEL} STATIC
${CMAKE_CURRENT_LIST_DIR}/src/${TIVAC_MODEL}/${COMPONENT_NAME}.c
)

target_include_directories(${COMPONENT_NAME}_${TIVAC_MODEL} PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include
)

add_library(${COMPONENT_NAME}::${TIVAC_MODEL} ALIAS ${COMPONENT_NAME}_${TIVAC_MODEL})

target_link_libraries( ${COMPONENT_NAME}_${TIVAC_MODEL}
TivaWare
Misc
BUS8080::${TIVAC_MODEL}
)

File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions MCP2515/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
################################################################################
# @file CMakeLists.txt
# @author Josepablo C (josepablo134@gmail.com)
################################################################################
set(COMPONENT_NAME MCP2515)
set(TIVAC_MODEL TivaCTM4C1294)

add_library(${COMPONENT_NAME}_${TIVAC_MODEL} STATIC
${CMAKE_CURRENT_LIST_DIR}/src/${TIVAC_MODEL}/${COMPONENT_NAME}_config.c
${CMAKE_CURRENT_LIST_DIR}/src/${TIVAC_MODEL}/${COMPONENT_NAME}_SPI.c
)

target_include_directories(${COMPONENT_NAME}_${TIVAC_MODEL} PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include
)

add_library(${COMPONENT_NAME}::${TIVAC_MODEL} ALIAS ${COMPONENT_NAME}_${TIVAC_MODEL})

target_link_libraries( ${COMPONENT_NAME}_${TIVAC_MODEL}
TivaWare
SPI::${TIVAC_MODEL}
)

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions Misc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
################################################################################
# @file CMakeLists.txt
# @author Josepablo C (josepablo134@gmail.com)
################################################################################
set(COMPONENT_NAME Misc)

add_library(${COMPONENT_NAME} STATIC
${CMAKE_CURRENT_LIST_DIR}/src/DEBUG.c
)

target_include_directories(${COMPONENT_NAME} PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include
)
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ used in embedded projects for Tiva C. This middlewares were tested on FreeRTOS.

This is work in progress.

The project structure is ment to be imported with CMake as follows:

```.cmake
add_subdirectory( lib/path/microMiddlewares/ )
```

# Future work

For now, each driver works using polling. In the next phase it will include an _open_ method with
Expand Down
20 changes: 20 additions & 0 deletions SPI/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
################################################################################
# @file CMakeLists.txt
# @author Josepablo C (josepablo134@gmail.com)
################################################################################
set(COMPONENT_NAME SPI)
set(TIVAC_MODEL TivaCTM4C1294)

add_library(${COMPONENT_NAME}_${TIVAC_MODEL} STATIC
${CMAKE_CURRENT_LIST_DIR}/src/${TIVAC_MODEL}/Driver${COMPONENT_NAME}.c
${CMAKE_CURRENT_LIST_DIR}/src/${TIVAC_MODEL}/Driver${COMPONENT_NAME}_config.c
)

target_include_directories(${COMPONENT_NAME}_${TIVAC_MODEL} PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include
)

add_library(${COMPONENT_NAME}::${TIVAC_MODEL} ALIAS ${COMPONENT_NAME}_${TIVAC_MODEL})

target_link_libraries( ${COMPONENT_NAME}_${TIVAC_MODEL} TivaWare )

File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions SSD1306/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
################################################################################
# @file CMakeLists.txt
# @author Josepablo C (josepablo134@gmail.com)
################################################################################
set(COMPONENT_NAME SSD1306)
set(TIVAC_MODEL TivaCTM4C1294)

add_library(${COMPONENT_NAME}_${TIVAC_MODEL} STATIC
${CMAKE_CURRENT_LIST_DIR}/src/${TIVAC_MODEL}/${COMPONENT_NAME}_i2c.c
)

target_include_directories(${COMPONENT_NAME}_${TIVAC_MODEL} PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include
)

add_library(${COMPONENT_NAME}::${TIVAC_MODEL} ALIAS ${COMPONENT_NAME}_${TIVAC_MODEL})

target_link_libraries( ${COMPONENT_NAME}_${TIVAC_MODEL}
TivaWare
I2C::${TIVAC_MODEL}
)


File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#endif

/// Public prototypes definitions
#include "SSD1306.h"
#include <SSD1306/SSD1306.h>
#include <stdint.h>

//////////////////////////////////
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// the directory "include/"
#include <SSD1306/SSD1306.h>
#include <SSD1306/SSD1306_i2c.h>
#include <SSD1306/SSD1306_i2c_regmap.h>

/// Specific configuration
#include <SSD1306/SSD1306_i2c_config.h>
#include <SSD1306/SSD1306_i2c_regmap.h>
#include <SSD1306/TivaCTM4C1294/SSD1306_i2c_config.h>

/// Middleware
#include <I2C/DriverI2C.h>
Expand Down
15 changes: 15 additions & 0 deletions System/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
################################################################################
# @file CMakeLists.txt
# @author Josepablo C (josepablo134@gmail.com)
################################################################################
set(COMPONENT_NAME System)

add_library(${COMPONENT_NAME} STATIC
${CMAKE_CURRENT_LIST_DIR}/src/DSP/LTISystem/LTISystem.c
${CMAKE_CURRENT_LIST_DIR}/src/uHeap/uHeap.c
)

target_include_directories(${COMPONENT_NAME} PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include
)

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
47 changes: 47 additions & 0 deletions TivaWare/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
################################################################################
# @file CMakeLists.txt
# @author Josepablo C (josepablo134@gmail.com)
################################################################################
set(COMPONENT_NAME TivaWare)

add_library(${COMPONENT_NAME} STATIC
${CMAKE_CURRENT_LIST_DIR}/driverlib/adc.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/aes.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/can.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/comp.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/cpu.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/crc.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/des.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/eeprom.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/emac.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/epi.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/flash.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/fpu.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/gpio.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/hibernate.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/i2c.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/interrupt.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/lcd.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/mpu.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/onewire.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/pwm.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/qei.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/shamd5.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/ssi.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/sw_crc.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/sysctl.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/sysexc.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/systick.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/timer.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/uart.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/udma.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/usb.c
${CMAKE_CURRENT_LIST_DIR}/driverlib/watchdog.c
)

target_include_directories(${COMPONENT_NAME} PUBLIC
${CMAKE_CURRENT_LIST_DIR}/
${CMAKE_CURRENT_LIST_DIR}/driverlib
${CMAKE_CURRENT_LIST_DIR}/driverlib/inc
)

Loading

0 comments on commit e2de74f

Please sign in to comment.