Started celaning the STM generated files as they are not needed anymore. TODO please check the readme !

interrupts
key 4 years ago
parent 5c4b21d476
commit c11620f148

@ -42,7 +42,7 @@ message("${Blue} |--> Libs used\t\t: ${EXTRA_LIBS} ${ColourReset}")
####################################################################################################
#EXECUTABLE
####################################################################################################
add_executable(${EXECUTABLE} main.cpp)
add_executable(${EXECUTABLE} main.c)
target_compile_options(${EXECUTABLE} PRIVATE ${CPP_FLAGS})
target_compile_definitions(${EXECUTABLE} PRIVATE ${CPP_DEFS})
target_include_directories(${EXECUTABLE} PUBLIC ${CPP_INCLUDES})

@ -5,7 +5,6 @@
extern "C" {
#endif
#include <stdint.h>
#include "../stm32f042/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h"
void delayMs(uint16_t delay);

@ -7,6 +7,8 @@ extern "C" {
#include <stdint.h>
extern uint32_t systemCoreClock; /*!< System Clock Frequency (Core Clock) */
void setupInit();
void setupClock();
void setupBus();

@ -31,8 +31,9 @@ extern "C" {
#include <stdint.h>
#ifdef ARM_MCU
#include "../stm32f042/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f042x6.h"
/*! Enum of the awailable pins for this package */
#include "stm32f042x6.h"
typedef enum
{
// NAME = BASE ADDR | PORT | PIN NO

@ -28,7 +28,6 @@ extern "C" {
#include "pin.h"
#include "../stm32f042/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f042x6.h"
#define NO_PARITY_CTRL 0
#define PARITY_CTRL 1

@ -3,6 +3,5 @@ project(Csl_Stm32f0xx ASM C CXX) # do this intead sf declaring languages in the
####################################################################################################
#SUBDIRECTORIES
####################################################################################################
add_subdirectory(Drivers)
add_subdirectory(startup)
add_subdirectory(Src)

@ -55,7 +55,6 @@
is no need to call the 2 first functions listed above, since SystemCoreClock
variable is updated automatically.
*/
extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
extern const uint8_t AHBPrescTable[16]; /*!< AHB prescalers table values */
extern const uint8_t APBPrescTable[8]; /*!< APB prescalers table values */

@ -1,18 +1,3 @@
set (STMSRC_INCLUDES
../Inc
)
set(STMSRC_SOURCES
stm32f0xx_csl.c
system_stm32f0xx.c
)
add_library(stmSources ${STMSRC_SOURCES})
target_compile_options(stmSources PRIVATE ${C_FLAGS})
target_compile_definitions(stmSources PRIVATE ${C_DEFS})
target_include_directories(stmSources PUBLIC ${STMSRC_INCLUDES})
target_link_libraries(stmSources sub::drivers)
add_library(sub::sources ALIAS stmSources)
add_library(stmDelay delay.c)
target_compile_options(stmDelay PRIVATE ${C_FLAGS})

@ -1,4 +1,5 @@
#include "delay.h"
#include "stm32f042x6.h"
void delayMs(uint16_t delay)

@ -1,5 +1,5 @@
#include"deviceSetup.h"
#include "../stm32f042/Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h"
#include "stm32f042x6.h"
#define SET_BIT(REG, BIT) ((REG) |= (BIT))

@ -22,6 +22,7 @@
#include"usart.h"
#include"pin.h"
#include "stm32f042x6.h"
#define SYST_CLK 8000000

@ -114,7 +114,7 @@ LoopFillZerobss:
bcc FillZerobss
/* Call the clock system intitialization function.*/
bl SystemInit
bl setupInit
/* Call static constructors */
bl __libc_init_array
/* Call the application's entry point.*/

@ -74,7 +74,6 @@ set (CPP_DEFS ${C_DEFS})
list(APPEND EXTRA_LIBS sub::startup)
list(APPEND EXTRA_LIBS sub::translator)
list(APPEND EXTRA_LIBS sub::sources)
list(APPEND EXTRA_LIBS sub::delay)
list(APPEND EXTRA_LIBS sub::pin)
list(APPEND EXTRA_LIBS sub::usart)

@ -2,7 +2,6 @@
Nucleo_f042k6::Nucleo_f042k6()
{
stmStart();
}
Nucleo_f042k6::~Nucleo_f042k6(){}

@ -2,7 +2,6 @@
#define BSL_NUCLEO_F042K6_H
#include "../csl/interfaces/pin.h"
#include "stm32f0xx_csl.h"
class Nucleo_f042k6
{

@ -1,6 +1,6 @@
#include "main.h"
#include "delay.h"
#include "stm32f0xx_csl.h"
#include "deviceSetup.h"
#include "usart.h"
#include "ascii.h"
@ -8,7 +8,6 @@ int main(int argc, char *argv[])
{
uint8_t i = 0;
uint8_t a = '0';
// stmStart();
delayInitMs(8000000, 1000);

@ -11,7 +11,6 @@ int main(int argc, char *argv[])
bool latch = false;
bool latch_old = false;
// setupInit();
delayInitMs(8000000, 1000);
// FreeRTOS_Delay dly;
@ -19,6 +18,8 @@ int main(int argc, char *argv[])
pinConfig(pinB3, output, pushPull, def_res, def_speed);
pinConfig(pinA0, input, def_stage, pullDown, def_speed);
setupInit(); // This is the sescond call of System init the asebly start code is calling it before the main.
usartInit( usart2,
pinA2,
pinA15,

Loading…
Cancel
Save