mirror of
https://github.com/avem-labs/Avem.git
synced 2023-09-01 15:18:49 +08:00
feat: (ISP) Program with STM32 built-in USB DFU Bootloader
This commit is contained in:
parent
5e07e04549
commit
c071af1322
2
Makefile
2
Makefile
@ -47,3 +47,5 @@ dump:
|
|||||||
open DUMP.s
|
open DUMP.s
|
||||||
tty: flash
|
tty: flash
|
||||||
screen /dev/tty.SLAB_USBtoUART 115200
|
screen /dev/tty.SLAB_USBtoUART 115200
|
||||||
|
dfu:
|
||||||
|
dfu-util -d 0483:df11 -c 1 -a 0 -s 0x08000000:leave -D main.bin
|
||||||
|
@ -10,7 +10,7 @@ MEMORY {
|
|||||||
EXTSRAM (RWX) : ORIGIN = 0x68000000 , LENGTH = 0
|
EXTSRAM (RWX) : ORIGIN = 0x68000000 , LENGTH = 0
|
||||||
/*Adust LENGTH to (FLASHsize - FeePROMsize) of target MCU:*/
|
/*Adust LENGTH to (FLASHsize - FeePROMsize) of target MCU:*/
|
||||||
/*STM32F103RBT --> 126K*/
|
/*STM32F103RBT --> 126K*/
|
||||||
FLASH (RX) : ORIGIN = 0x08000000 , LENGTH = 508K
|
FLASH (RX) : ORIGIN = 0x08000000 , LENGTH = 256K
|
||||||
/*STM32F103RET --> 508K*/
|
/*STM32F103RET --> 508K*/
|
||||||
/*FLASH (RX) : ORIGIN = 0x08000000 , LENGTH = 508K*/
|
/*FLASH (RX) : ORIGIN = 0x08000000 , LENGTH = 508K*/
|
||||||
/*STM32F103ZET --> 508K*/
|
/*STM32F103ZET --> 508K*/
|
||||||
|
@ -191,6 +191,15 @@ void drawille_task() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
RCC->APB2ENR |= RCC_APB2ENR_IOPBEN;
|
||||||
|
GPIOB->CRH &= 0xFFFFF0FF;
|
||||||
|
GPIOB->CRH |= 0x00000300;
|
||||||
|
while(1) {
|
||||||
|
GPIOB->ODR &= 0b11111111111111111111101111111111;
|
||||||
|
delay(1000);
|
||||||
|
GPIOB->ODR |= 0b00000000000000000000010000000000;
|
||||||
|
delay(1000);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_BLDC
|
#ifdef DEBUG_BLDC
|
||||||
//Brushless motor auto init
|
//Brushless motor auto init
|
||||||
|
Loading…
x
Reference in New Issue
Block a user