mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Fix bootloader size
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
* Created on: 2 May 2021
|
||||
* Author: Ralim
|
||||
*/
|
||||
#include "Pins.h"
|
||||
#include "Setup.h"
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include "Pins.h"
|
||||
#include <string.h>
|
||||
|
||||
#ifndef CORE_DRIVERS_WS2812_H_
|
||||
#define CORE_DRIVERS_WS2812_H_
|
||||
@@ -22,8 +22,8 @@
|
||||
template <uint32_t LED_GPIO, uint16_t LED_PIN, int LED_COUNT> class WS2812 {
|
||||
private:
|
||||
uint8_t leds_colors[WS2812_LED_CHANNEL_COUNT * LED_COUNT];
|
||||
public:
|
||||
|
||||
public:
|
||||
void led_update() {
|
||||
__disable_irq();
|
||||
// Bitbang it out as our cpu irq latency is too high
|
||||
@@ -71,8 +71,7 @@ public:
|
||||
__asm__ __volatile__("nop");
|
||||
__asm__ __volatile__("nop");
|
||||
}
|
||||
((GPIO_TypeDef*) WS2812_GPIO_Port)->BSRR = (uint32_t) WS2812_Pin
|
||||
<< 16u;
|
||||
((GPIO_TypeDef *)WS2812_GPIO_Port)->BSRR = (uint32_t)WS2812_Pin << 16u;
|
||||
__asm__ __volatile__("nop");
|
||||
__asm__ __volatile__("nop");
|
||||
__asm__ __volatile__("nop");
|
||||
@@ -105,9 +104,7 @@ public:
|
||||
__enable_irq();
|
||||
}
|
||||
|
||||
void init(void) {
|
||||
memset(leds_colors, 0, sizeof(leds_colors));
|
||||
}
|
||||
void init(void) { memset(leds_colors, 0, sizeof(leds_colors)); }
|
||||
|
||||
void led_set_color(size_t index, uint8_t r, uint8_t g, uint8_t b) {
|
||||
leds_colors[index * WS2812_LED_CHANNEL_COUNT + 0] = g;
|
||||
@@ -122,7 +119,6 @@ public:
|
||||
leds_colors[index * WS2812_LED_CHANNEL_COUNT + 2] = b;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif /* CORE_DRIVERS_WS2812_H_ */
|
||||
|
||||
@@ -127,7 +127,7 @@ CPUFLAGS= -mcpu=cortex-m3 \
|
||||
-mthumb \
|
||||
-mfloat-abi=soft
|
||||
flash_size=128k
|
||||
bootldr_size=0x8000
|
||||
bootldr_size=32k
|
||||
endif
|
||||
ifeq ($(model),$(ALL_PINE_MODELS))
|
||||
$(info Building for Pine64 )
|
||||
|
||||
Reference in New Issue
Block a user