get everything into a basically compiling state

This commit is contained in:
skullY 2017-10-29 16:13:12 -07:00
parent d8240ee255
commit 1dc73dc103
6 changed files with 25 additions and 7 deletions

View File

@ -2,5 +2,6 @@
#define KEYBOARDS_CHIBIOS_TEST_STM32_L476_ONEKEY_CONFIG_H_ #define KEYBOARDS_CHIBIOS_TEST_STM32_L476_ONEKEY_CONFIG_H_
#include "../config.h" #include "../config.h"
#undef NKRO_ENABLE
#endif /* KEYBOARDS_CHIBIOS_TEST_STM32_L476_ONEKEY_CONFIG_H_ */ #endif /* KEYBOARDS_CHIBIOS_TEST_STM32_L476_ONEKEY_CONFIG_H_ */

View File

@ -139,7 +139,7 @@
* @brief Enables the SERIAL subsystem. * @brief Enables the SERIAL subsystem.
*/ */
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
#define HAL_USE_SERIAL TRUE #define HAL_USE_SERIAL FALSE
#endif #endif
/** /**
@ -167,7 +167,7 @@
* @brief Enables the USB subsystem. * @brief Enables the USB subsystem.
*/ */
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) #if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
#define HAL_USE_USB FALSE #define HAL_USE_USB TRUE
#endif #endif
/** /**
@ -380,7 +380,7 @@
* @note Disabling this option saves both code and data space. * @note Disabling this option saves both code and data space.
*/ */
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
#define USB_USE_WAIT FALSE #define USB_USE_WAIT TRUE
#endif #endif
#endif /* HALCONF_H */ #endif /* HALCONF_H */

View File

@ -250,7 +250,7 @@
* SERIAL driver system settings. * SERIAL driver system settings.
*/ */
#define STM32_SERIAL_USE_USART1 FALSE #define STM32_SERIAL_USE_USART1 FALSE
#define STM32_SERIAL_USE_USART2 TRUE #define STM32_SERIAL_USE_USART2 FALSE
#define STM32_SERIAL_USE_USART3 FALSE #define STM32_SERIAL_USE_USART3 FALSE
#define STM32_SERIAL_USE_LPUART1 FALSE #define STM32_SERIAL_USE_LPUART1 FALSE
#define STM32_SERIAL_USART1_PRIORITY 12 #define STM32_SERIAL_USART1_PRIORITY 12
@ -321,7 +321,7 @@
/* /*
* USB driver system settings. * USB driver system settings.
*/ */
#define STM32_USB_USE_OTG1 FALSE #define STM32_USB_USE_OTG1 TRUE
#define STM32_USB_OTG1_IRQ_PRIORITY 14 #define STM32_USB_OTG1_IRQ_PRIORITY 14
#define STM32_USB_OTG1_RX_FIFO_SIZE 512 #define STM32_USB_OTG1_RX_FIFO_SIZE 512
#define STM32_USB_OTG_THREAD_PRIO LOWPRIO #define STM32_USB_OTG_THREAD_PRIO LOWPRIO

View File

@ -2,6 +2,9 @@
SRC = matrix.c \ SRC = matrix.c \
led.c led.c
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000 -R
# STM32L476 Discovery board # STM32L476 Discovery board
MCU_LDSCRIPT = STM32L476xG MCU_LDSCRIPT = STM32L476xG
BOARD = ST_STM32L476_DISCOVERY BOARD = ST_STM32L476_DISCOVERY

View File

@ -29,7 +29,20 @@ void bootloader_jump(void) {
NVIC_SystemReset(); NVIC_SystemReset();
} }
#else /* defined(STM32F0XX) */ #elif defined(STM32L4XX)
/* This code should be checked whether it runs correctly on platforms.
* It was added for chibios_test/stm32_l476_onekey BUT HAS NOT BEEN TESTED.
* FIXME - Test this
*/
#define SYMVAL(sym) (uint32_t)(((uint8_t *)&(sym)) - ((uint8_t *)0))
extern uint32_t __ram0_end__;
void bootloader_jump(void) {
*((unsigned long *)(SYMVAL(__ram0_end__) - 4)) = 0xDEADBEEF; // set magic flag => reset handler will jump into boot loader
NVIC_SystemReset();
}
#else /* defined(STM32L4XX) */
#error Check that the bootloader code works on your platform and add it to bootloader.c! #error Check that the bootloader code works on your platform and add it to bootloader.c!
#endif /* defined(STM32F0XX) */ #endif /* defined(STM32F0XX) */

View File

@ -1054,7 +1054,8 @@ void send_remote_wakeup(USBDriver *usbp) {
wait_ms(15); wait_ms(15);
STM32_USB->CNTR &= ~CNTR_RESUME; STM32_USB->CNTR &= ~CNTR_RESUME;
#else /* End STM32F0XX || STM32F1XX || STM32F3XX */ #else /* End STM32F0XX || STM32F1XX || STM32F3XX */
#warning Sending remote wakeup packet not implemented for your platform. //FIXME!!!!
//#warning Sending remote wakeup packet not implemented for your platform.
#endif #endif
} }