1
0
forked from me/IronOS

Fix bootloader size

This commit is contained in:
Ben V. Brown
2021-05-04 18:54:09 +10:00
parent bdeb8ef38a
commit b10a65dd74
5 changed files with 104 additions and 116 deletions

View File

@@ -13,11 +13,11 @@
#include "main.hpp"
#include <IRQ.h>
WS2812<GPIOA_BASE,WS2812_Pin,1> ws2812;
volatile uint16_t PWMSafetyTimer = 0;
volatile uint8_t pendingPWM = 0;
uint16_t totalPWM = 255;
const uint16_t powerPWM = 255;
WS2812<GPIOA_BASE, WS2812_Pin, 1> ws2812;
volatile uint16_t PWMSafetyTimer = 0;
volatile uint8_t pendingPWM = 0;
uint16_t totalPWM = 255;
const uint16_t powerPWM = 255;
history<uint16_t, PID_TIM_HZ> rawTempFilter = {{0}, 0, 0};
void resetWatchdog() { HAL_IWDG_Refresh(&hiwdg); }
@@ -427,7 +427,7 @@ void setStatusLED(const enum StatusLED state) {
break;
case LED_HEATING: {
ws2812.led_set_color(0, ((HAL_GetTick() / 10) % 192) + 64, 0,
0); // Red fade
0); // Red fade
} break;
case LED_HOT:
ws2812.led_set_color(0, 0xFF, 0, 0); // red

View File

@@ -15,7 +15,6 @@
void preRToSInit() {
/* Reset of all peripherals, Initializes the Flash interface and the Systick.
*/
SCB->VTOR = FLASH_BASE; // Set vector table offset
HAL_Init();
Setup_HAL(); // Setup all the HAL objects
BSPInit();

View File

@@ -13,13 +13,6 @@
/* #define DATA_IN_ExtSRAM */
#endif /* STM32F100xE || STM32F101xE || STM32F101xG || STM32F103xE || STM32F103xG */
#ifndef VECT_TAB_OFFSET
#define VECT_TAB_OFFSET \
0x00004000U /*!< Vector Table base offset field. \
This value must be a multiple of 0x200. */
// We offset this by 0x4000 to because of the bootloader
#endif
/*******************************************************************************
* Clock Definitions
*******************************************************************************/
@@ -90,7 +83,7 @@ void SystemInit(void) {
#ifdef VECT_TAB_SRAM
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
#else
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH. */
SCB->VTOR = FLASH_BASE | 0x8000; /* Vector Table Relocation in Internal FLASH. */
#endif
}