fix/adapt cherry-pick from busvoodoo branch
This commit is contained in:
parent
62bfaf3973
commit
7169785e56
|
@ -230,16 +230,10 @@ void main(void)
|
||||||
bool char_flag = false; // a new character has been received
|
bool char_flag = false; // a new character has been received
|
||||||
while (true) { // infinite loop
|
while (true) { // infinite loop
|
||||||
iwdg_reset(); // kick the dog
|
iwdg_reset(); // kick the dog
|
||||||
while (uart_received) { // data received over UART
|
while (user_input_available) { // user input is available
|
||||||
action = true; // action has been performed
|
action = true; // action has been performed
|
||||||
led_toggle(); // toggle LED
|
led_toggle(); // toggle LED
|
||||||
c = uart_getchar(); // store receive character
|
c = user_input_get(); // store receive character
|
||||||
char_flag = true; // notify character has been received
|
|
||||||
}
|
|
||||||
while (usb_cdcacm_received) { // data received over USB
|
|
||||||
action = true; // action has been performed
|
|
||||||
led_toggle(); // toggle LED
|
|
||||||
c = usb_cdcacm_getchar(); // store receive character
|
|
||||||
char_flag = true; // notify character has been received
|
char_flag = true; // notify character has been received
|
||||||
}
|
}
|
||||||
while (char_flag) { // user data received
|
while (char_flag) { // user data received
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
/* linker script for application running on STM32F103x8 micro-controller
|
/* linker script for application running on STM32F103x8 micro-controller
|
||||||
* the STM32F103xC has 256 KB of flash starting at 0x0800 0000, and 20 KB of RAM starting at 0x2000 0000
|
* the STM32F103xB has 128 KB of flash starting at 0x0800 0000, and 20 KB of RAM starting at 0x2000 0000
|
||||||
* the USB DFU bootloader will take the first 8 KB of flash, followed by the application
|
* the USB DFU bootloader will take the first 8 KB of flash, followed by the application
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Define memory regions. */
|
/* Define memory regions. */
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
rom (rx) : ORIGIN = 0x08000000 + 8K, LENGTH = 248K
|
rom (rx) : ORIGIN = 0x08000000 + 8K, LENGTH = 120K
|
||||||
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
|
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
|
||||||
}
|
}
|
||||||
PROVIDE(__application_beginning = ORIGIN(rom));
|
PROVIDE(__application_beginning = ORIGIN(rom));
|
||||||
/* only provide application end if you want to force a flash size
|
/* only provide application_end and/or flash_end if you want to force a flash size
|
||||||
i.e. STM32F103x8 most often have if fact 128 KB instead of the specified and advertised 64 KB
|
i.e. STM32F103x8 most often have if fact 128 KB instead of the specified and advertised 64 KB
|
||||||
|
*/
|
||||||
PROVIDE(__application_end = ORIGIN(rom) + LENGTH(rom));
|
PROVIDE(__application_end = ORIGIN(rom) + LENGTH(rom));
|
||||||
PROVIDE(__flash_end = ORIGIN(rom) + LENGTH(rom));
|
PROVIDE(__flash_end = ORIGIN(rom) + LENGTH(rom));
|
||||||
*/
|
|
||||||
|
|
||||||
/* include rest of the definitions for the STM32F1 family */
|
/* include rest of the definitions for the STM32F1 family */
|
||||||
INCLUDE libopencm3_stm32f1.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* linker script for application running on STM32F103x8 micro-controller
|
/* linker script for application running on STM32F103x8 micro-controller
|
||||||
* the STM32F103xC has 256 KB of flash starting at 0x0800 0000, and 20 KB of RAM starting at 0x2000 0000
|
* the STM32F103xB has 128 KB of flash starting at 0x0800 0000, and 20 KB of RAM starting at 0x2000 0000
|
||||||
* the USB DFU bootloader will take the first 8 KB of flash, followed by the application
|
* the USB DFU bootloader will take the first 8 KB of flash, followed by the application
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -10,11 +10,11 @@ MEMORY
|
||||||
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
|
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
|
||||||
}
|
}
|
||||||
PROVIDE(__application_beginning = ORIGIN(rom) + LENGTH(rom));
|
PROVIDE(__application_beginning = ORIGIN(rom) + LENGTH(rom));
|
||||||
/* only provide application end if you want to force a flash size
|
/* only provide application_end and/or flash_end if you want to force a flash size
|
||||||
i.e. STM32F103x8 most often have if fact 128 KB instead of the specified and advertised 64 KB
|
i.e. STM32F103x8 most often have if fact 128 KB instead of the specified and advertised 64 KB
|
||||||
PROVIDE(__application_end = __application_beginning + 248K);
|
|
||||||
PROVIDE(__flash_end = __application_beginning + 248K);
|
|
||||||
*/
|
*/
|
||||||
|
PROVIDE(__application_end = __application_beginning + 120K);
|
||||||
|
PROVIDE(__flash_end = __application_beginning + 120K);
|
||||||
|
|
||||||
/* include rest of the definitions for the STM32F1 family */
|
/* include rest of the definitions for the STM32F1 family */
|
||||||
INCLUDE libopencm3_stm32f1.ld
|
INCLUDE libopencm3_stm32f1.ld
|
||||||
|
|
Loading…
Reference in New Issue