diff --git a/Lab2_example/Craig/Src/main.c b/Lab2_example/Craig/Src/main.c index e62130395357d8fd46a72560dbd6ca61e8f2917c..38893a1c92f6febaeea5f9db97fae39b6ecd9bed 100644 --- a/Lab2_example/Craig/Src/main.c +++ b/Lab2_example/Craig/Src/main.c @@ -4,85 +4,17 @@ * @author MCD Application Team * @brief Main program body ****************************************************************************** - * @attention - * - * <h2><center>© Copyright (c) 2017 STMicroelectronics. - * All rights reserved.</center></h2> - * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Includes ------------------------------------------------------------------*/ -#include "main.h" - -/** @addtogroup STM32L4xx_HAL_Examples - * @{ - */ - -/** @addtogroup BSP - * @{ - */ - -/* Private typedef -----------------------------------------------------------*/ -/* Private define ------------------------------------------------------------*/ -/* Private macro -------------------------------------------------------------*/ -/* Private variables ---------------------------------------------------------*/ -extern UART_HandleTypeDef hDiscoUart; -#ifdef __GNUC__ -/* With GCC/RAISONANCE, small msg_info (option LD Linker->Libraries->Small msg_info - set to 'Yes') calls __io_putchar() */ -#define PUTCHAR_PROTOTYPE int __io_putchar(int ch) -#define GETCHAR_PROTOTYPE int __io_getchar(void) -#else -#define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) -#define GETCHAR_PROTOTYPE int fgetc(FILE *f) -#endif /* __GNUC__ */ -/* Private function prototypes -----------------------------------------------*/ -static void SystemClock_Config(void); - -/* Private functions ---------------------------------------------------------*/ -/** * @brief Main program * @param None * @retval None */ + #include <stdio.h> int main(void) { int count; - /* STM32L4xx HAL library initialization: - - Configure the Flash prefetch, Flash preread and Buffer caches - - Systick timer is configured by default as source of time base, but user - can eventually implement his proper time base source (a general purpose - timer for example or other time source), keeping in mind that Time base - duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and - handled in milliseconds basis. - - Low Level Initialization - */ - HAL_Init(); - - /* Configure the System clock to have a frequency of 80 MHz */ - SystemClock_Config(); - - /* Initialize all configured peripherals */ - hDiscoUart.Instance = DISCOVERY_COM1; - hDiscoUart.Init.BaudRate = 115200; - hDiscoUart.Init.WordLength = UART_WORDLENGTH_8B; - hDiscoUart.Init.StopBits = UART_STOPBITS_1; - hDiscoUart.Init.Parity = UART_PARITY_NONE; - hDiscoUart.Init.Mode = UART_MODE_TX_RX; - hDiscoUart.Init.HwFlowCtl = UART_HWCONTROL_NONE; - hDiscoUart.Init.OverSampling = UART_OVERSAMPLING_16; - hDiscoUart.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; - hDiscoUart.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; - - BSP_COM_Init(COM1, &hDiscoUart); + printf("Welcome to the ESP Lab 1 test program \n"); printf("this program does next to nothing!\n"); @@ -94,155 +26,4 @@ int main(void) } } -/** - * @brief System Clock Configuration - * The system Clock is configured as follow : - * System Clock source = PLL (MSI) - * SYSCLK(Hz) = 80000000 - * HCLK(Hz) = 80000000 - * AHB Prescaler = 1 - * APB1 Prescaler = 1 - * APB2 Prescaler = 1 - * MSI Frequency(Hz) = 4000000 - * PLL_M = 1 - * PLL_N = 40 - * PLL_R = 2 - * PLL_P = 7 - * PLL_Q = 4 - * Flash Latency(WS) = 4 - * @param None - * @retval None - */ -static void SystemClock_Config(void) -{ - RCC_ClkInitTypeDef RCC_ClkInitStruct; - RCC_OscInitTypeDef RCC_OscInitStruct; - - /* MSI is enabled after System reset, activate PLL with MSI as source */ - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_MSI; - RCC_OscInitStruct.MSIState = RCC_MSI_ON; - RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_6; - RCC_OscInitStruct.MSICalibrationValue = RCC_MSICALIBRATION_DEFAULT; - RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; - RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_MSI; - RCC_OscInitStruct.PLL.PLLM = 1; - RCC_OscInitStruct.PLL.PLLN = 40; - RCC_OscInitStruct.PLL.PLLR = 2; - RCC_OscInitStruct.PLL.PLLP = 7; - RCC_OscInitStruct.PLL.PLLQ = 4; - if(HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) - { - /* Initialization Error */ - while(1); - } - - /* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 - clocks dividers */ - RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2); - RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; - RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; - RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; - RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; - if(HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_4) != HAL_OK) - { - /* Initialization Error */ - while(1); - } -} - -/** - * @brief Gets numeric values from the Hyperterminal. - * @param Maximun value allowed (value) - * @retval The character received - */ -uint32_t Serial_Scanf(uint32_t value) -{ - uint16_t tmp = 0; - - tmp = getchar(); - - if (tmp > value) - { - printf("\n\r !!! Please enter valid number between 0 and %lu \n", value); - return 0xFF; - } - return tmp; -} - -/** - * @brief Retargets the C library msg_info function to the USART. - * @param None - * @retval None - */ -PUTCHAR_PROTOTYPE -{ - /* Place your implementation of fputc here */ - /* e.g. write a character to the serial port and Loop until the end of transmission */ - while (HAL_OK != HAL_UART_Transmit(&hDiscoUart, (uint8_t *) &ch, 1, 30000)) - { - ; - } - return ch; -} - -/** - * @brief Retargets the C library scanf function to the USART. - * @param None - * @retval None - */ -GETCHAR_PROTOTYPE -{ - /* Place your implementation of fgetc here */ - /* e.g. readwrite a character to the USART2 and Loop until the end of transmission */ - uint8_t ch = 0; - while (HAL_OK != HAL_UART_Receive(&hDiscoUart, (uint8_t *)&ch, 1, 30000)) - { - ; - } - return ch; -} - -/** - * @brief This function is executed in case of error occurrence. - * @param None - * @retval None - */ -void Error_Handler(void) -{ - /* User can add his own implementation to report the HAL error return state */ - printf("!!! ERROR !!!\n"); - while(1) - { - } -} - -#ifdef USE_FULL_ASSERT - -/** - * @brief Reports the name of the source file and the source line number - * where the assert_param error has occurred. - * @param file: pointer to the source file name - * @param line: assert_param error line source number - * @retval None - */ -void assert_failed(uint8_t* file, uint32_t line) -{ - /* User can add his own implementation to report the file name and line number, - ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ - - /* Infinite loop */ - while (1) - { - } -} -#endif - -/** - * @} - */ - -/** - * @} - */ -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Lab2_example/Craig/demo.elf b/Lab2_example/Craig/demo.elf deleted file mode 100755 index fee7d28e8289d037f87258512a1596f2b50effdb..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/demo.elf and /dev/null differ diff --git a/Lab2_example/Craig/main.o b/Lab2_example/Craig/main.o deleted file mode 100644 index 9cc2aeb702df9d9df9a41a1621bb5a3c5fac00cf..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/main.o and /dev/null differ diff --git a/Lab2_example/Craig/settings.txt~ b/Lab2_example/Craig/settings.txt~ deleted file mode 100644 index ba6b7dafeaae27f20fdce517a08ff7ecb47dd7c9..0000000000000000000000000000000000000000 --- a/Lab2_example/Craig/settings.txt~ +++ /dev/null @@ -1,132 +0,0 @@ -;; This buffer is for text that is not saved, and for Lisp evaluation. -;; To create a file, visit it with C-x C-f and enter text in its buffer. - -\..\..\Drivers\CMSIS\Include</state> - <state>$PROJ_DIR$\ - <state>$PROJ_DIR$\ - <state>$PROJ_DIR$ - <state>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\Components\Common</state> - <state>$PROJ_DIR$\ - <state>$PROJ_DIR$\ - <state>$PROJ_DIR$\ -<state>$PROJ_DIR$\ -$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\B-L475E-IOT01\stm32l475e_iot01.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\B-L475E-IOT01\stm32l475e_iot01_accelero.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\B-L475E-IOT01\stm32l475e_iot01_gyro.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\B-L475E-IOT01\stm32l475e_iot01_hsensor.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\B-L475E-IOT01\stm32l475e_iot01_magneto.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\B-L475E-IOT01\stm32l475e_iot01_psensor.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\B-L475E-IOT01\stm32l475e_iot01_qspi.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\B-L475E-IOT01\stm32l475e_iot01_tsensor.c</name> - </file> - </group> - <group> - <name>Components</name> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\Components\hts221\hts221.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\Components\lis3mdl\lis3mdl.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\Components\lps22hb\lps22hb.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\Components\lsm6dsl\lsm6dsl.c</name> -</file> - -<name>CMSIS</name> - <file> - <name>$PROJ_DIR$\..\Src\system_stm32l4xx.c</name> - </file> - </group> - <group> - <name>STM32L4xx_HAL_Driver</name> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_cortex.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dfsdm.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dma.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash_ex.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash_ramfunc.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_gpio.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_i2c.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_i2c_ex.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_pwr.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_pwr_ex.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_qspi.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_rcc.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_rcc_ex.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_uart.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_uart_ex.c</name> - </file> - </group> - </group> - <group> - <name>Example</name> - <group> - <name>EWARM</name> - <file> - <name>$PROJ_DIR$\startup_stm32l475xx.s</name> - </file> - </group> - <group> - <name>User</name> - <file> - <name>$PROJ_DIR$\..\Src\main.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\Src\qspi.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\Src\sensors.c</name> - </file> - <file> - <name>$PROJ_DIR$\..\Src\stm32l4xx_it.c</name> diff --git a/Lab2_example/Craig/startup_stm32f10x.c b/Lab2_example/Craig/startup_stm32f10x.c deleted file mode 100644 index 06cd2f1cc1c73085973b250c646aebe9b2858fae..0000000000000000000000000000000000000000 --- a/Lab2_example/Craig/startup_stm32f10x.c +++ /dev/null @@ -1,201 +0,0 @@ -/* Generated by startup_generator */ - -#include <stm32f10x.h> -#include <core_cm3.h> - -extern void _estack(void); // to force type checking -void Reset_Handler(void); -void default_handler (void) -{ - while(1); -} - -void __attribute__ ((weak)) __libc_init_array (void){} - -// Linker supplied pointers - -extern unsigned long _sidata; -extern unsigned long _sdata; -extern unsigned long _edata; -extern unsigned long _sbss; -extern unsigned long _ebss; - -extern int main(void); - -void Reset_Handler(void) { - - unsigned long *src, *dst; - - src = &_sidata; - dst = &_sdata; - - // Copy data initializers - - while (dst < &_edata) - *(dst++) = *(src++); - - // Zero bss - - dst = &_sbss; - while (dst < &_ebss) - *(dst++) = 0; - - SystemInit(); - __libc_init_array(); - main(); - while(1) {} -} - -/* Vector Table */ - -void NMI_Handler (void) __attribute__ ((weak, alias ("default_handler"))); -void HardFault_Handler (void) __attribute__ ((weak, alias ("default_handler"))); -void MemMange_Handler (void) __attribute__ ((weak, alias ("default_handler"))); -void BusFault_Handler (void) __attribute__ ((weak, alias ("default_handler"))); -void UsageFault_Handler (void) __attribute__ ((weak, alias ("default_handler"))); -void SVC_Handler (void) __attribute__ ((weak, alias ("default_handler"))); -void DebugMon_Handler (void) __attribute__ ((weak, alias ("default_handler"))); -void PendSV_Handler (void) __attribute__ ((weak, alias ("default_handler"))); -void SysTick_Handler (void) __attribute__ ((weak, alias ("default_handler"))); -void WWDG_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void PVD_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void TAMPER_STAMP_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void RTC_WKUP_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void FLASH_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void RCC_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void EXTI0_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void EXTI1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void EXTI2_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void EXTI3_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void EXTI4_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void DMA1_Channel1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void DMA1_Channel2_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void DMA1_Channel3_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void DMA1_Channel4_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void DMA1_Channel5_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void DMA1_Channel6_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void DMA1_Channel7_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void ADC1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void EXTI9_5_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void TIM1_BRK_TIM15_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void TIM1_UP_TIM16_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void TIM1_TRG_COM_TIM17_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void TIM1_CC_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void TIM2_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void TIM3_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void TIM4_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void I2C1_EV_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void I2C1_ER_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void I2C2_EV_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void I2C2_ER_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void SPI1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void SPI2_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void USART1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void USART2_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void USART3_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void EXTI15_10_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void RTCAlarm_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void CEC_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void TIM12_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void TIM13_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void TIM14_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void ADC3_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void FSMC_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void TIM5_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void SPI3_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void UART4_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void UART5_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void TIM6_DAC_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void TIM7_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void DMA2_Channel1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void DMA2_Channel2_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void DMA2_Channel3_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void DMA2_Channel4_5_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); -void DMA2_Channel5_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); - - - -__attribute__ ((section(".isr_vector"))) - -void (* const g_pfnVectors[])(void) = { - - _estack, - Reset_Handler, - NMI_Handler, - HardFault_Handler, - MemMange_Handler, - BusFault_Handler, - UsageFault_Handler, - 0, 0, 0, 0, - SVC_Handler, - DebugMon_Handler, - 0, - PendSV_Handler, - SysTick_Handler, - WWDG_IRQHandler, - PVD_IRQHandler, - TAMPER_STAMP_IRQHandler, - RTC_WKUP_IRQHandler, - FLASH_IRQHandler, - RCC_IRQHandler, - EXTI0_IRQHandler, - EXTI1_IRQHandler, - EXTI2_IRQHandler, - EXTI3_IRQHandler, - EXTI4_IRQHandler, - DMA1_Channel1_IRQHandler, - DMA1_Channel2_IRQHandler, - DMA1_Channel3_IRQHandler, - DMA1_Channel4_IRQHandler, - DMA1_Channel5_IRQHandler, - DMA1_Channel6_IRQHandler, - DMA1_Channel7_IRQHandler, - ADC1_IRQHandler, - 0, 0, 0, 0, - EXTI9_5_IRQHandler, - TIM1_BRK_TIM15_IRQHandler, - TIM1_UP_TIM16_IRQHandler, - TIM1_TRG_COM_TIM17_IRQHandler, - TIM1_CC_IRQHandler, - TIM2_IRQHandler, - TIM3_IRQHandler, - TIM4_IRQHandler, - I2C1_EV_IRQHandler, - I2C1_ER_IRQHandler, - I2C2_EV_IRQHandler, - I2C2_ER_IRQHandler, - SPI1_IRQHandler, - SPI2_IRQHandler, - USART1_IRQHandler, - USART2_IRQHandler, - USART3_IRQHandler, - EXTI15_10_IRQHandler, - RTCAlarm_IRQHandler, - CEC_IRQHandler, - TIM12_IRQHandler, - TIM13_IRQHandler, - TIM14_IRQHandler, - 0, - ADC3_IRQHandler, - FSMC_IRQHandler, - 0, - TIM5_IRQHandler, - SPI3_IRQHandler, - UART4_IRQHandler, - UART5_IRQHandler, - TIM6_DAC_IRQHandler, - TIM7_IRQHandler, - DMA2_Channel1_IRQHandler, - DMA2_Channel2_IRQHandler, - DMA2_Channel3_IRQHandler, - DMA2_Channel4_5_IRQHandler, - DMA2_Channel5_IRQHandler, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, -#if defined (STM32F10X_LD_VL) || (defined STM32F10X_MD_VL) - [0x1CC/4] = 0xF108F85F -#elif defined (STM32F10X_HD_VL) - [0x1E0/4] = 0xF108F85F -#endif - - }; diff --git a/Lab2_example/Craig/startup_stm32l475xx.c b/Lab2_example/Craig/startup_stm32l475xx.c new file mode 100644 index 0000000000000000000000000000000000000000..92ddf78095b0396d5de4c8e34fd6af21dbfe40bc --- /dev/null +++ b/Lab2_example/Craig/startup_stm32l475xx.c @@ -0,0 +1,432 @@ +/* changed by craig for lab 2*/ + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" +#define BootRAM 0xF1E0F85F + +// Linker supplied pointers +extern unsigned long _sidata; +extern unsigned long _sdata; +extern unsigned long _edata; +extern unsigned long _sbss; +extern unsigned long _ebss; + +extern UART_HandleTypeDef hDiscoUart; +#ifdef __GNUC__ +/* With GCC/RAISONANCE, small msg_info (option LD Linker->Libraries->Small msg_info + set to 'Yes') calls __io_putchar() */ +#define PUTCHAR_PROTOTYPE int __io_putchar(int ch) +#define GETCHAR_PROTOTYPE int __io_getchar(void) +#else +#define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f) +#define GETCHAR_PROTOTYPE int fgetc(FILE *f) +#endif /* __GNUC__ */ +/* Private function prototypes -----------------------------------------------*/ +static void SystemClock_Config(void); +extern int main(void); +extern void _estack(void); // to force type checking +void Reset_Handler(void); +void Hal_start(void); +void __attribute__ ((weak)) __libc_init_array (void){} + +void default_handler (void) +{ + while(1); +} + +void Hal_start(void) { + /* STM32L4xx HAL library initialization: + - Configure the Flash prefetch, Flash preread and Buffer caches + - Systick timer is configured by default as source of time base, but user + can eventually implement his proper time base source (a general purpose + timer for example or other time source), keeping in mind that Time base + duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and + handled in milliseconds basis. + - Low Level Initialization + */ + HAL_Init(); + + /* Configure the System clock to have a frequency of 80 MHz */ + SystemClock_Config(); + + /* Initialize all configured peripherals */ + hDiscoUart.Instance = DISCOVERY_COM1; + hDiscoUart.Init.BaudRate = 115200; + hDiscoUart.Init.WordLength = UART_WORDLENGTH_8B; + hDiscoUart.Init.StopBits = UART_STOPBITS_1; + hDiscoUart.Init.Parity = UART_PARITY_NONE; + hDiscoUart.Init.Mode = UART_MODE_TX_RX; + hDiscoUart.Init.HwFlowCtl = UART_HWCONTROL_NONE; + hDiscoUart.Init.OverSampling = UART_OVERSAMPLING_16; + hDiscoUart.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; + hDiscoUart.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; + + BSP_COM_Init(COM1, &hDiscoUart); +} + +/** + * @brief System Clock Configuration + * The system Clock is configured as follow : + * System Clock source = PLL (MSI) + * SYSCLK(Hz) = 80000000 + * HCLK(Hz) = 80000000 + * AHB Prescaler = 1 + * APB1 Prescaler = 1 + * APB2 Prescaler = 1 + * MSI Frequency(Hz) = 4000000 + * PLL_M = 1 + * PLL_N = 40 + * PLL_R = 2 + * PLL_P = 7 + * PLL_Q = 4 + * Flash Latency(WS) = 4 + * @param None + * @retval None + */ +static void SystemClock_Config(void) +{ + RCC_ClkInitTypeDef RCC_ClkInitStruct; + RCC_OscInitTypeDef RCC_OscInitStruct; + + /* MSI is enabled after System reset, activate PLL with MSI as source */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_MSI; + RCC_OscInitStruct.MSIState = RCC_MSI_ON; + RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_6; + RCC_OscInitStruct.MSICalibrationValue = RCC_MSICALIBRATION_DEFAULT; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_MSI; + RCC_OscInitStruct.PLL.PLLM = 1; + RCC_OscInitStruct.PLL.PLLN = 40; + RCC_OscInitStruct.PLL.PLLR = 2; + RCC_OscInitStruct.PLL.PLLP = 7; + RCC_OscInitStruct.PLL.PLLQ = 4; + if(HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) + { + /* Initialization Error */ + while(1); + } + + /* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 + clocks dividers */ + RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2); + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; + if(HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_4) != HAL_OK) + { + /* Initialization Error */ + while(1); + } +} + +void Reset_Handler(void) { + + unsigned long *src, *dst; + + src = &_sidata; + dst = &_sdata; + + // Copy data initializers + + while (dst < &_edata) + *(dst++) = *(src++); + + // Zero bss + + dst = &_sbss; + while (dst < &_ebss) + *(dst++) = 0; + + SystemInit(); + Hal_start(); + __libc_init_array(); + main(); + while(1) {} +} + +/** + * @brief Gets numeric values from the Hyperterminal. + * @param Maximun value allowed (value) + * @retval The character received + */ +uint32_t Serial_Scanf(uint32_t value) +{ + uint16_t tmp = 0; + + tmp = getchar(); + + if (tmp > value) + { + printf("\n\r !!! Please enter valid number between 0 and %lu \n", value); + return 0xFF; + } + return tmp; +} + +/** + * @brief Retargets the C library msg_info function to the USART. + * @param None + * @retval None + */ +PUTCHAR_PROTOTYPE +{ + /* Place your implementation of fputc here */ + /* e.g. write a character to the serial port and Loop until the end of transmission */ + while (HAL_OK != HAL_UART_Transmit(&hDiscoUart, (uint8_t *) &ch, 1, 30000)) + { + ; + } + return ch; +} + +/** + * @brief Retargets the C library scanf function to the USART. + * @param None + * @retval None + */ +GETCHAR_PROTOTYPE +{ + /* Place your implementation of fgetc here */ + /* e.g. readwrite a character to the USART2 and Loop until the end of transmission */ + uint8_t ch = 0; + while (HAL_OK != HAL_UART_Receive(&hDiscoUart, (uint8_t *)&ch, 1, 30000)) + { + ; + } + return ch; +} + +/** + * @brief This function is executed in case of error occurrence. + * @param None + * @retval None + */ +void Error_Handler(void) +{ + /* User can add his own implementation to report the HAL error return state */ + printf("!!! ERROR !!!\n"); + while(1) + { + } +} + +#ifdef USE_FULL_ASSERT + +/** + * @brief Reports the name of the source file and the source line number + * where the assert_param error has occurred. + * @param file: pointer to the source file name + * @param line: assert_param error line source number + * @retval None + */ +void assert_failed(uint8_t* file, uint32_t line) +{ + /* User can add his own implementation to report the file name and line number, + ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ + + /* Infinite loop */ + while (1) + { + } +} +#endif + + +/* Vector Table */ + +void NMI_Handler (void) __attribute__ ((weak, alias ("default_handler"))); +void HardFault_Handler (void) __attribute__ ((weak, alias ("default_handler"))); +void MemMange_Handler (void) __attribute__ ((weak, alias ("default_handler"))); +void BusFault_Handler (void) __attribute__ ((weak, alias ("default_handler"))); +void UsageFault_Handler (void) __attribute__ ((weak, alias ("default_handler"))); +void SVC_Handler (void) __attribute__ ((weak, alias ("default_handler"))); +void DebugMon_Handler (void) __attribute__ ((weak, alias ("default_handler"))); +void PendSV_Handler (void) __attribute__ ((weak, alias ("default_handler"))); +void SysTick_Handler (void) __attribute__ ((weak, alias ("default_handler"))); +void WWDG_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void PVD_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void TAMPER_STAMP_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void RTC_WKUP_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void FLASH_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void RCC_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void EXTI0_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void EXTI1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void EXTI2_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void EXTI3_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void EXTI4_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void DMA1_Channel1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void DMA1_Channel2_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void DMA1_Channel3_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void DMA1_Channel4_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void DMA1_Channel5_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void DMA1_Channel6_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void DMA1_Channel7_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void ADC1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void CAN1_TX_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void CAN1_RX0_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void CAN1_RX1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void CAN1_SCE_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void EXTI9_5_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void TIM1_BRK_TIM15_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void TIM1_UP_TIM16_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void TIM1_TRG_COM_TIM17_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void TIM1_CC_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void TIM2_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void TIM3_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void TIM4_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void I2C1_EV_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void I2C1_ER_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void I2C2_EV_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void I2C2_ER_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void SPI1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void SPI2_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void USART1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void USART2_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void USART3_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void EXTI15_10_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void RTCAlarm_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void DFSDM1_FLT3_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void TIM8_BRK_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void TIM8_UP_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void TIM8_TRG_COM_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void TIM8_CC_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void ADC3_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void FSMC_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void SDMMC1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void TIM5_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void SPI3_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void UART4_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void UART5_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void TIM6_DAC_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void TIM7_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void DMA2_Channel1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void DMA2_Channel2_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void DMA2_Channel3_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void DMA2_Channel4_5_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void DMA2_Channel5_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void DFSDM1_FLT0_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void DFSDM1_FLT1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void DFSDM1_FLT2_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void COMP_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void LPTIM1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void LPTIM2_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void OTG_FS_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void DMA2_Channel6_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void DMA2_Channel7_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void LPUART1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void QUADSPI_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void I2C3_EV_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void I2C3_ER_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void SAI1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void SAI2_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void SWPMI1_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void TSC_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void RNG_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); +void FPU_IRQHandler (void) __attribute__ ((weak, alias ("default_handler"))); + + +__attribute__ ((section(".isr_vector"))) + +void (* const g_pfnVectors[])(void) = { + + _estack, + Reset_Handler, + NMI_Handler, + HardFault_Handler, + MemMange_Handler, + BusFault_Handler, + UsageFault_Handler, + 0, + 0, + 0, + 0, + SVC_Handler, + DebugMon_Handler, + 0, + PendSV_Handler, + SysTick_Handler, + WWDG_IRQHandler, + PVD_IRQHandler, + TAMPER_STAMP_IRQHandler, + RTC_WKUP_IRQHandler, + FLASH_IRQHandler, + RCC_IRQHandler, + EXTI0_IRQHandler, + EXTI1_IRQHandler, + EXTI2_IRQHandler, + EXTI3_IRQHandler, + EXTI4_IRQHandler, + DMA1_Channel1_IRQHandler, + DMA1_Channel2_IRQHandler, + DMA1_Channel3_IRQHandler, + DMA1_Channel4_IRQHandler, + DMA1_Channel5_IRQHandler, + DMA1_Channel6_IRQHandler, + DMA1_Channel7_IRQHandler, + ADC1_IRQHandler, + CAN1_TX_IRQHandler, + CAN1_RX0_IRQHandler, + CAN1_RX1_IRQHandler, + CAN1_SCE_IRQHandler, + EXTI9_5_IRQHandler, + TIM1_BRK_TIM15_IRQHandler, + TIM1_UP_TIM16_IRQHandler, + TIM1_TRG_COM_TIM17_IRQHandler, + TIM1_CC_IRQHandler, + TIM2_IRQHandler, + TIM3_IRQHandler, + TIM4_IRQHandler, + I2C1_EV_IRQHandler, + I2C1_ER_IRQHandler, + I2C2_EV_IRQHandler, + I2C2_ER_IRQHandler, + SPI1_IRQHandler, + SPI2_IRQHandler, + USART1_IRQHandler, + USART2_IRQHandler, + USART3_IRQHandler, + EXTI15_10_IRQHandler, + RTCAlarm_IRQHandler, + DFSDM1_FLT3_IRQHandler, + TIM8_BRK_IRQHandler, + TIM8_UP_IRQHandler, + TIM8_TRG_COM_IRQHandler, + TIM8_CC_IRQHandler, + ADC3_IRQHandler, + FSMC_IRQHandler, + SDMMC1_IRQHandler, + TIM5_IRQHandler, + SPI3_IRQHandler, + UART4_IRQHandler, + UART5_IRQHandler, + TIM6_DAC_IRQHandler, + TIM7_IRQHandler, + DMA2_Channel1_IRQHandler, + DMA2_Channel2_IRQHandler, + DMA2_Channel3_IRQHandler, + DMA2_Channel4_5_IRQHandler, + DMA2_Channel5_IRQHandler, + DFSDM1_FLT0_IRQHandler, + DFSDM1_FLT1_IRQHandler, + DFSDM1_FLT2_IRQHandler, + COMP_IRQHandler, + LPTIM1_IRQHandler, + LPTIM2_IRQHandler, + OTG_FS_IRQHandler, + DMA2_Channel6_IRQHandler, + DMA2_Channel7_IRQHandler, + LPUART1_IRQHandler, + QUADSPI_IRQHandler, + I2C3_EV_IRQHandler, + I2C3_ER_IRQHandler, + SAI1_IRQHandler, + SAI2_IRQHandler, + SWPMI1_IRQHandler, + TSC_IRQHandler, + 0, + 0, + RNG_IRQHandler, + FPU_IRQHandler + + }; diff --git a/Lab2_example/Craig/startup_stm32l475xx.o b/Lab2_example/Craig/startup_stm32l475xx.o deleted file mode 100644 index 20b481216aea6e0881d38bcf87a14dbc18cc6ac0..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/startup_stm32l475xx.o and /dev/null differ diff --git a/Lab2_example/Craig/startup_stm32l475xx.s b/Lab2_example/Craig/startup_stm32l475xx.s deleted file mode 100644 index 5e40b9c3e7844e2f5c90aaef71de263e1453b250..0000000000000000000000000000000000000000 --- a/Lab2_example/Craig/startup_stm32l475xx.s +++ /dev/null @@ -1,506 +0,0 @@ -/** - ****************************************************************************** - * @file startup_stm32l475xx.s - * @author MCD Application Team - * @brief STM32L475xx devices vector table for GCC toolchain. - * This module performs: - * - Set the initial SP - * - Set the initial PC == Reset_Handler, - * - Set the vector table entries with the exceptions ISR address, - * - Configure the clock system - * - Branches to main in the C library (which eventually - * calls main()). - * After Reset the Cortex-M4 processor is in Thread mode, - * priority is Privileged, and the Stack is set to Main. - ****************************************************************************** - * @attention - * - * <h2><center>© Copyright (c) 2017 STMicroelectronics. - * All rights reserved.</center></h2> - * - * This software component is licensed by ST under Apache License, Version 2.0, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/Apache-2.0 - * - ****************************************************************************** - */ - - .syntax unified - .cpu cortex-m4 - .fpu softvfp - .thumb - -.global g_pfnVectors -.global Default_Handler - -/* start address for the initialization values of the .data section. -defined in linker script */ -.word _sidata -/* start address for the .data section. defined in linker script */ -.word _sdata -/* end address for the .data section. defined in linker script */ -.word _edata -/* start address for the .bss section. defined in linker script */ -.word _sbss -/* end address for the .bss section. defined in linker script */ -.word _ebss - -.equ BootRAM, 0xF1E0F85F -/** - * @brief This is the code that gets called when the processor first - * starts execution following a reset event. Only the absolutely - * necessary set is performed, after which the application - * supplied main() routine is called. - * @param None - * @retval : None -*/ - - .section .text.Reset_Handler - .weak Reset_Handler - .type Reset_Handler, %function -Reset_Handler: - ldr sp, =_estack /* Set stack pointer */ - -/* Call the clock system initialization function.*/ - bl SystemInit - -/* Copy the data segment initializers from flash to SRAM */ - movs r1, #0 - b LoopCopyDataInit - -CopyDataInit: - ldr r3, =_sidata - ldr r3, [r3, r1] - str r3, [r0, r1] - adds r1, r1, #4 - -LoopCopyDataInit: - ldr r0, =_sdata - ldr r3, =_edata - adds r2, r0, r1 - cmp r2, r3 - bcc CopyDataInit - ldr r2, =_sbss - b LoopFillZerobss -/* Zero fill the bss segment. */ -FillZerobss: - movs r3, #0 - str r3, [r2], #4 - -LoopFillZerobss: - ldr r3, = _ebss - cmp r2, r3 - bcc FillZerobss - -/* Call static constructors */ - bl __libc_init_array -/* Call the application's entry point.*/ - bl main - -LoopForever: - b LoopForever - -.size Reset_Handler, .-Reset_Handler - -/** - * @brief This is the code that gets called when the processor receives an - * unexpected interrupt. This simply enters an infinite loop, preserving - * the system state for examination by a debugger. - * - * @param None - * @retval : None -*/ - .section .text.Default_Handler,"ax",%progbits -Default_Handler: -Infinite_Loop: - b Infinite_Loop - .size Default_Handler, .-Default_Handler -/****************************************************************************** -* -* The minimal vector table for a Cortex-M4. Note that the proper constructs -* must be placed on this to ensure that it ends up at physical address -* 0x0000.0000. -* -******************************************************************************/ - .section .isr_vector,"a",%progbits - .type g_pfnVectors, %object - .size g_pfnVectors, .-g_pfnVectors - - -g_pfnVectors: - .word _estack - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word MemManage_Handler - .word BusFault_Handler - .word UsageFault_Handler - .word 0 - .word 0 - .word 0 - .word 0 - .word SVC_Handler - .word DebugMon_Handler - .word 0 - .word PendSV_Handler - .word SysTick_Handler - .word WWDG_IRQHandler - .word PVD_PVM_IRQHandler - .word TAMP_STAMP_IRQHandler - .word RTC_WKUP_IRQHandler - .word FLASH_IRQHandler - .word RCC_IRQHandler - .word EXTI0_IRQHandler - .word EXTI1_IRQHandler - .word EXTI2_IRQHandler - .word EXTI3_IRQHandler - .word EXTI4_IRQHandler - .word DMA1_Channel1_IRQHandler - .word DMA1_Channel2_IRQHandler - .word DMA1_Channel3_IRQHandler - .word DMA1_Channel4_IRQHandler - .word DMA1_Channel5_IRQHandler - .word DMA1_Channel6_IRQHandler - .word DMA1_Channel7_IRQHandler - .word ADC1_2_IRQHandler - .word CAN1_TX_IRQHandler - .word CAN1_RX0_IRQHandler - .word CAN1_RX1_IRQHandler - .word CAN1_SCE_IRQHandler - .word EXTI9_5_IRQHandler - .word TIM1_BRK_TIM15_IRQHandler - .word TIM1_UP_TIM16_IRQHandler - .word TIM1_TRG_COM_TIM17_IRQHandler - .word TIM1_CC_IRQHandler - .word TIM2_IRQHandler - .word TIM3_IRQHandler - .word TIM4_IRQHandler - .word I2C1_EV_IRQHandler - .word I2C1_ER_IRQHandler - .word I2C2_EV_IRQHandler - .word I2C2_ER_IRQHandler - .word SPI1_IRQHandler - .word SPI2_IRQHandler - .word USART1_IRQHandler - .word USART2_IRQHandler - .word USART3_IRQHandler - .word EXTI15_10_IRQHandler - .word RTC_Alarm_IRQHandler - .word DFSDM1_FLT3_IRQHandler - .word TIM8_BRK_IRQHandler - .word TIM8_UP_IRQHandler - .word TIM8_TRG_COM_IRQHandler - .word TIM8_CC_IRQHandler - .word ADC3_IRQHandler - .word FMC_IRQHandler - .word SDMMC1_IRQHandler - .word TIM5_IRQHandler - .word SPI3_IRQHandler - .word UART4_IRQHandler - .word UART5_IRQHandler - .word TIM6_DAC_IRQHandler - .word TIM7_IRQHandler - .word DMA2_Channel1_IRQHandler - .word DMA2_Channel2_IRQHandler - .word DMA2_Channel3_IRQHandler - .word DMA2_Channel4_IRQHandler - .word DMA2_Channel5_IRQHandler - .word DFSDM1_FLT0_IRQHandler - .word DFSDM1_FLT1_IRQHandler - .word DFSDM1_FLT2_IRQHandler - .word COMP_IRQHandler - .word LPTIM1_IRQHandler - .word LPTIM2_IRQHandler - .word OTG_FS_IRQHandler - .word DMA2_Channel6_IRQHandler - .word DMA2_Channel7_IRQHandler - .word LPUART1_IRQHandler - .word QUADSPI_IRQHandler - .word I2C3_EV_IRQHandler - .word I2C3_ER_IRQHandler - .word SAI1_IRQHandler - .word SAI2_IRQHandler - .word SWPMI1_IRQHandler - .word TSC_IRQHandler - .word 0 - .word 0 - .word RNG_IRQHandler - .word FPU_IRQHandler - - -/******************************************************************************* -* -* Provide weak aliases for each Exception handler to the Default_Handler. -* As they are weak aliases, any function with the same name will override -* this definition. -* -*******************************************************************************/ - - .weak NMI_Handler - .thumb_set NMI_Handler,Default_Handler - - .weak HardFault_Handler - .thumb_set HardFault_Handler,Default_Handler - - .weak MemManage_Handler - .thumb_set MemManage_Handler,Default_Handler - - .weak BusFault_Handler - .thumb_set BusFault_Handler,Default_Handler - - .weak UsageFault_Handler - .thumb_set UsageFault_Handler,Default_Handler - - .weak SVC_Handler - .thumb_set SVC_Handler,Default_Handler - - .weak DebugMon_Handler - .thumb_set DebugMon_Handler,Default_Handler - - .weak PendSV_Handler - .thumb_set PendSV_Handler,Default_Handler - - .weak SysTick_Handler - .thumb_set SysTick_Handler,Default_Handler - - .weak WWDG_IRQHandler - .thumb_set WWDG_IRQHandler,Default_Handler - - .weak PVD_PVM_IRQHandler - .thumb_set PVD_PVM_IRQHandler,Default_Handler - - .weak TAMP_STAMP_IRQHandler - .thumb_set TAMP_STAMP_IRQHandler,Default_Handler - - .weak RTC_WKUP_IRQHandler - .thumb_set RTC_WKUP_IRQHandler,Default_Handler - - .weak FLASH_IRQHandler - .thumb_set FLASH_IRQHandler,Default_Handler - - .weak RCC_IRQHandler - .thumb_set RCC_IRQHandler,Default_Handler - - .weak EXTI0_IRQHandler - .thumb_set EXTI0_IRQHandler,Default_Handler - - .weak EXTI1_IRQHandler - .thumb_set EXTI1_IRQHandler,Default_Handler - - .weak EXTI2_IRQHandler - .thumb_set EXTI2_IRQHandler,Default_Handler - - .weak EXTI3_IRQHandler - .thumb_set EXTI3_IRQHandler,Default_Handler - - .weak EXTI4_IRQHandler - .thumb_set EXTI4_IRQHandler,Default_Handler - - .weak DMA1_Channel1_IRQHandler - .thumb_set DMA1_Channel1_IRQHandler,Default_Handler - - .weak DMA1_Channel2_IRQHandler - .thumb_set DMA1_Channel2_IRQHandler,Default_Handler - - .weak DMA1_Channel3_IRQHandler - .thumb_set DMA1_Channel3_IRQHandler,Default_Handler - - .weak DMA1_Channel4_IRQHandler - .thumb_set DMA1_Channel4_IRQHandler,Default_Handler - - .weak DMA1_Channel5_IRQHandler - .thumb_set DMA1_Channel5_IRQHandler,Default_Handler - - .weak DMA1_Channel6_IRQHandler - .thumb_set DMA1_Channel6_IRQHandler,Default_Handler - - .weak DMA1_Channel7_IRQHandler - .thumb_set DMA1_Channel7_IRQHandler,Default_Handler - - .weak ADC1_2_IRQHandler - .thumb_set ADC1_2_IRQHandler,Default_Handler - - .weak CAN1_TX_IRQHandler - .thumb_set CAN1_TX_IRQHandler,Default_Handler - - .weak CAN1_RX0_IRQHandler - .thumb_set CAN1_RX0_IRQHandler,Default_Handler - - .weak CAN1_RX1_IRQHandler - .thumb_set CAN1_RX1_IRQHandler,Default_Handler - - .weak CAN1_SCE_IRQHandler - .thumb_set CAN1_SCE_IRQHandler,Default_Handler - - .weak EXTI9_5_IRQHandler - .thumb_set EXTI9_5_IRQHandler,Default_Handler - - .weak TIM1_BRK_TIM15_IRQHandler - .thumb_set TIM1_BRK_TIM15_IRQHandler,Default_Handler - - .weak TIM1_UP_TIM16_IRQHandler - .thumb_set TIM1_UP_TIM16_IRQHandler,Default_Handler - - .weak TIM1_TRG_COM_TIM17_IRQHandler - .thumb_set TIM1_TRG_COM_TIM17_IRQHandler,Default_Handler - - .weak TIM1_CC_IRQHandler - .thumb_set TIM1_CC_IRQHandler,Default_Handler - - .weak TIM2_IRQHandler - .thumb_set TIM2_IRQHandler,Default_Handler - - .weak TIM3_IRQHandler - .thumb_set TIM3_IRQHandler,Default_Handler - - .weak TIM4_IRQHandler - .thumb_set TIM4_IRQHandler,Default_Handler - - .weak I2C1_EV_IRQHandler - .thumb_set I2C1_EV_IRQHandler,Default_Handler - - .weak I2C1_ER_IRQHandler - .thumb_set I2C1_ER_IRQHandler,Default_Handler - - .weak I2C2_EV_IRQHandler - .thumb_set I2C2_EV_IRQHandler,Default_Handler - - .weak I2C2_ER_IRQHandler - .thumb_set I2C2_ER_IRQHandler,Default_Handler - - .weak SPI1_IRQHandler - .thumb_set SPI1_IRQHandler,Default_Handler - - .weak SPI2_IRQHandler - .thumb_set SPI2_IRQHandler,Default_Handler - - .weak USART1_IRQHandler - .thumb_set USART1_IRQHandler,Default_Handler - - .weak USART2_IRQHandler - .thumb_set USART2_IRQHandler,Default_Handler - - .weak USART3_IRQHandler - .thumb_set USART3_IRQHandler,Default_Handler - - .weak EXTI15_10_IRQHandler - .thumb_set EXTI15_10_IRQHandler,Default_Handler - - .weak RTC_Alarm_IRQHandler - .thumb_set RTC_Alarm_IRQHandler,Default_Handler - - .weak DFSDM1_FLT3_IRQHandler - .thumb_set DFSDM1_FLT3_IRQHandler,Default_Handler - - .weak TIM8_BRK_IRQHandler - .thumb_set TIM8_BRK_IRQHandler,Default_Handler - - .weak TIM8_UP_IRQHandler - .thumb_set TIM8_UP_IRQHandler,Default_Handler - - .weak TIM8_TRG_COM_IRQHandler - .thumb_set TIM8_TRG_COM_IRQHandler,Default_Handler - - .weak TIM8_CC_IRQHandler - .thumb_set TIM8_CC_IRQHandler,Default_Handler - - .weak ADC3_IRQHandler - .thumb_set ADC3_IRQHandler,Default_Handler - - .weak FMC_IRQHandler - .thumb_set FMC_IRQHandler,Default_Handler - - .weak SDMMC1_IRQHandler - .thumb_set SDMMC1_IRQHandler,Default_Handler - - .weak TIM5_IRQHandler - .thumb_set TIM5_IRQHandler,Default_Handler - - .weak SPI3_IRQHandler - .thumb_set SPI3_IRQHandler,Default_Handler - - .weak UART4_IRQHandler - .thumb_set UART4_IRQHandler,Default_Handler - - .weak UART5_IRQHandler - .thumb_set UART5_IRQHandler,Default_Handler - - .weak TIM6_DAC_IRQHandler - .thumb_set TIM6_DAC_IRQHandler,Default_Handler - - .weak TIM7_IRQHandler - .thumb_set TIM7_IRQHandler,Default_Handler - - .weak DMA2_Channel1_IRQHandler - .thumb_set DMA2_Channel1_IRQHandler,Default_Handler - - .weak DMA2_Channel2_IRQHandler - .thumb_set DMA2_Channel2_IRQHandler,Default_Handler - - .weak DMA2_Channel3_IRQHandler - .thumb_set DMA2_Channel3_IRQHandler,Default_Handler - - .weak DMA2_Channel4_IRQHandler - .thumb_set DMA2_Channel4_IRQHandler,Default_Handler - - .weak DMA2_Channel5_IRQHandler - .thumb_set DMA2_Channel5_IRQHandler,Default_Handler - - .weak DFSDM1_FLT0_IRQHandler - .thumb_set DFSDM1_FLT0_IRQHandler,Default_Handler - - .weak DFSDM1_FLT1_IRQHandler - .thumb_set DFSDM1_FLT1_IRQHandler,Default_Handler - - .weak DFSDM1_FLT2_IRQHandler - .thumb_set DFSDM1_FLT2_IRQHandler,Default_Handler - - .weak COMP_IRQHandler - .thumb_set COMP_IRQHandler,Default_Handler - - .weak LPTIM1_IRQHandler - .thumb_set LPTIM1_IRQHandler,Default_Handler - - .weak LPTIM2_IRQHandler - .thumb_set LPTIM2_IRQHandler,Default_Handler - - .weak OTG_FS_IRQHandler - .thumb_set OTG_FS_IRQHandler,Default_Handler - - .weak DMA2_Channel6_IRQHandler - .thumb_set DMA2_Channel6_IRQHandler,Default_Handler - - .weak DMA2_Channel7_IRQHandler - .thumb_set DMA2_Channel7_IRQHandler,Default_Handler - - .weak LPUART1_IRQHandler - .thumb_set LPUART1_IRQHandler,Default_Handler - - .weak QUADSPI_IRQHandler - .thumb_set QUADSPI_IRQHandler,Default_Handler - - .weak I2C3_EV_IRQHandler - .thumb_set I2C3_EV_IRQHandler,Default_Handler - - .weak I2C3_ER_IRQHandler - .thumb_set I2C3_ER_IRQHandler,Default_Handler - - .weak SAI1_IRQHandler - .thumb_set SAI1_IRQHandler,Default_Handler - - .weak SAI2_IRQHandler - .thumb_set SAI2_IRQHandler,Default_Handler - - .weak SWPMI1_IRQHandler - .thumb_set SWPMI1_IRQHandler,Default_Handler - - .weak TSC_IRQHandler - .thumb_set TSC_IRQHandler,Default_Handler - - .weak RNG_IRQHandler - .thumb_set RNG_IRQHandler,Default_Handler - - .weak FPU_IRQHandler - .thumb_set FPU_IRQHandler,Default_Handler -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/Lab2_example/Craig/stm32l475e_iot01.o b/Lab2_example/Craig/stm32l475e_iot01.o deleted file mode 100644 index b7776be2ab0ae9b1eeb5f7468edd1a96e1f3fb2a..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l475e_iot01.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l475e_iot01_qspi.o b/Lab2_example/Craig/stm32l475e_iot01_qspi.o deleted file mode 100644 index 423b9ef593560ac173227c9ed6a2e9584dade6fc..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l475e_iot01_qspi.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_hal.o b/Lab2_example/Craig/stm32l4xx_hal.o deleted file mode 100644 index 72fbab79aa55ee772db71c915690c01a0c5a5419..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_hal.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_hal_cortex.o b/Lab2_example/Craig/stm32l4xx_hal_cortex.o deleted file mode 100644 index 2b3047f51543923a2ea0b20d851d63b68c501053..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_hal_cortex.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_hal_dfsdm.o b/Lab2_example/Craig/stm32l4xx_hal_dfsdm.o deleted file mode 100644 index 86592b1e16f6f09d22ec410b5e692c1bb233e888..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_hal_dfsdm.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_hal_dma.o b/Lab2_example/Craig/stm32l4xx_hal_dma.o deleted file mode 100644 index ffe29dfbc3671b116cfe9d0597f88b92c8ec7f6c..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_hal_dma.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_hal_flash.o b/Lab2_example/Craig/stm32l4xx_hal_flash.o deleted file mode 100644 index d6eda844767a79d5ac9e1c8152bdae279329c311..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_hal_flash.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_hal_flash_ex.o b/Lab2_example/Craig/stm32l4xx_hal_flash_ex.o deleted file mode 100644 index 03aed0efa6f501bcc191e850aceb8355a63ec0d6..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_hal_flash_ex.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_hal_flash_ramfunc.o b/Lab2_example/Craig/stm32l4xx_hal_flash_ramfunc.o deleted file mode 100644 index 59cc7c4e66f2508fc1fd06b47ea38edf82159332..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_hal_flash_ramfunc.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_hal_gpio.o b/Lab2_example/Craig/stm32l4xx_hal_gpio.o deleted file mode 100644 index 15f0826fe19e321b6e21ba8e0d45b48ee119b763..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_hal_gpio.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_hal_i2c.o b/Lab2_example/Craig/stm32l4xx_hal_i2c.o deleted file mode 100644 index 4963f9feeca71030c448819ae154a153250aabd4..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_hal_i2c.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_hal_i2c_ex.o b/Lab2_example/Craig/stm32l4xx_hal_i2c_ex.o deleted file mode 100644 index dbc6a9a4b9348e5ad4ba724049decce7d68b6f62..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_hal_i2c_ex.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_hal_msp.o b/Lab2_example/Craig/stm32l4xx_hal_msp.o deleted file mode 100644 index ca65dafc96323159d9f40b012c0b6646a1b57dd3..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_hal_msp.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_hal_pwr.o b/Lab2_example/Craig/stm32l4xx_hal_pwr.o deleted file mode 100644 index 124f9cce287bcb78dcba4ff2cdb8a0e1ce91b2c4..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_hal_pwr.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_hal_pwr_ex.o b/Lab2_example/Craig/stm32l4xx_hal_pwr_ex.o deleted file mode 100644 index c5dc42115e037258da39068b7913ad8118a26555..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_hal_pwr_ex.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_hal_qspi.o b/Lab2_example/Craig/stm32l4xx_hal_qspi.o deleted file mode 100644 index eb311e2c9101f447318c944912d3352a85f1ef5e..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_hal_qspi.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_hal_rcc.o b/Lab2_example/Craig/stm32l4xx_hal_rcc.o deleted file mode 100644 index f027f718cc66381c3984d633acb07ba47d78e65a..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_hal_rcc.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_hal_rcc_ex.o b/Lab2_example/Craig/stm32l4xx_hal_rcc_ex.o deleted file mode 100644 index 7e922cf0a26460ba176bfb105439042f8dd29699..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_hal_rcc_ex.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_hal_uart.o b/Lab2_example/Craig/stm32l4xx_hal_uart.o deleted file mode 100644 index 3baf85ba43e3ec465936f5807cdc5037b8cf58dd..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_hal_uart.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_hal_uart_ex.o b/Lab2_example/Craig/stm32l4xx_hal_uart_ex.o deleted file mode 100644 index 62aee8479294ffad5659628424b5fa49c1bb07cd..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_hal_uart_ex.o and /dev/null differ diff --git a/Lab2_example/Craig/stm32l4xx_it.o b/Lab2_example/Craig/stm32l4xx_it.o deleted file mode 100644 index edcefa320d02344b512c6483c09cafffeec25f7c..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/stm32l4xx_it.o and /dev/null differ diff --git a/Lab2_example/Craig/syscalls.o b/Lab2_example/Craig/syscalls.o deleted file mode 100644 index db9c9f27d44ab1e63440ee851882f615e906fc78..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/syscalls.o and /dev/null differ diff --git a/Lab2_example/Craig/system_stm32l4xx.o b/Lab2_example/Craig/system_stm32l4xx.o deleted file mode 100644 index c5b2fa192dd6ead867fb0ef4961f3faa72b616cb..0000000000000000000000000000000000000000 Binary files a/Lab2_example/Craig/system_stm32l4xx.o and /dev/null differ