mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-27 20:37:30 +00:00
add jlinkscript for detect rtt
This commit is contained in:
parent
04b1a67898
commit
bb0e688b8e
@ -37,7 +37,7 @@ extern "C" {
|
|||||||
#define SW1 BSP_IO_PORT_01_PIN_05
|
#define SW1 BSP_IO_PORT_01_PIN_05
|
||||||
#define BUTTON_STATE_ACTIVE 0
|
#define BUTTON_STATE_ACTIVE 0
|
||||||
|
|
||||||
const ioport_pin_cfg_t board_pin_cfg[] = {
|
static const ioport_pin_cfg_t board_pin_cfg[] = {
|
||||||
{.pin = LED1, .pin_cfg = IOPORT_CFG_PORT_DIRECTION_OUTPUT},
|
{.pin = LED1, .pin_cfg = IOPORT_CFG_PORT_DIRECTION_OUTPUT},
|
||||||
{.pin = SW1, .pin_cfg = IOPORT_CFG_PORT_DIRECTION_INPUT},
|
{.pin = SW1, .pin_cfg = IOPORT_CFG_PORT_DIRECTION_INPUT},
|
||||||
// USB FS D+, D-, VBus
|
// USB FS D+, D-, VBus
|
||||||
|
@ -37,7 +37,7 @@ extern "C" {
|
|||||||
#define SW1 (BSP_IO_PORT_00_PIN_05)
|
#define SW1 (BSP_IO_PORT_00_PIN_05)
|
||||||
#define BUTTON_STATE_ACTIVE 0
|
#define BUTTON_STATE_ACTIVE 0
|
||||||
|
|
||||||
const ioport_pin_cfg_t board_pin_cfg[] = {
|
static const ioport_pin_cfg_t board_pin_cfg[] = {
|
||||||
{.pin = LED1, .pin_cfg = IOPORT_CFG_PORT_DIRECTION_OUTPUT},
|
{.pin = LED1, .pin_cfg = IOPORT_CFG_PORT_DIRECTION_OUTPUT},
|
||||||
{.pin = SW1, .pin_cfg = IOPORT_CFG_PORT_DIRECTION_INPUT},
|
{.pin = SW1, .pin_cfg = IOPORT_CFG_PORT_DIRECTION_INPUT},
|
||||||
// USB FS D+, D-, VBus
|
// USB FS D+, D-, VBus
|
||||||
|
@ -37,7 +37,7 @@ extern "C" {
|
|||||||
#define SW1 BSP_IO_PORT_04_PIN_15
|
#define SW1 BSP_IO_PORT_04_PIN_15
|
||||||
#define BUTTON_STATE_ACTIVE 0
|
#define BUTTON_STATE_ACTIVE 0
|
||||||
|
|
||||||
const ioport_pin_cfg_t board_pin_cfg[] = {
|
static const ioport_pin_cfg_t board_pin_cfg[] = {
|
||||||
{.pin = LED1, .pin_cfg = IOPORT_CFG_PORT_DIRECTION_OUTPUT},
|
{.pin = LED1, .pin_cfg = IOPORT_CFG_PORT_DIRECTION_OUTPUT},
|
||||||
{.pin = SW1, .pin_cfg = IOPORT_CFG_PORT_DIRECTION_INPUT},
|
{.pin = SW1, .pin_cfg = IOPORT_CFG_PORT_DIRECTION_INPUT},
|
||||||
// USB FS D+, D-, VBus
|
// USB FS D+, D-, VBus
|
||||||
|
@ -37,7 +37,7 @@ extern "C" {
|
|||||||
#define SW1 BSP_IO_PORT_00_PIN_05
|
#define SW1 BSP_IO_PORT_00_PIN_05
|
||||||
#define BUTTON_STATE_ACTIVE 0
|
#define BUTTON_STATE_ACTIVE 0
|
||||||
|
|
||||||
const ioport_pin_cfg_t board_pin_cfg[] = {
|
static const ioport_pin_cfg_t board_pin_cfg[] = {
|
||||||
{ .pin = LED1, .pin_cfg = IOPORT_CFG_PORT_DIRECTION_OUTPUT | IOPORT_CFG_PORT_OUTPUT_LOW },
|
{ .pin = LED1, .pin_cfg = IOPORT_CFG_PORT_DIRECTION_OUTPUT | IOPORT_CFG_PORT_OUTPUT_LOW },
|
||||||
{ .pin = SW1, .pin_cfg = IOPORT_CFG_PORT_DIRECTION_INPUT },
|
{ .pin = SW1, .pin_cfg = IOPORT_CFG_PORT_DIRECTION_INPUT },
|
||||||
|
|
||||||
|
4
hw/bsp/ra/debug.jlinkscript
Normal file
4
hw/bsp/ra/debug.jlinkscript
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
int SetupTarget(void) {
|
||||||
|
JLINK_ExecCommand("SetRTTSearchRanges 0x20000000 0x80000");
|
||||||
|
return 0;
|
||||||
|
}
|
@ -90,12 +90,12 @@ void board_init(void)
|
|||||||
R_SYSTEM->TRCKCR = R_SYSTEM_TRCKCR_TRCKEN_Msk;
|
R_SYSTEM->TRCKCR = R_SYSTEM_TRCKCR_TRCKEN_Msk;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
board_led_write(false);
|
// Enable USB module
|
||||||
|
R_MSTP->MSTPCRB &= ~(1U << 11U); // FS
|
||||||
|
|
||||||
/* Enable USB_BASE */
|
#ifdef R_USB_HS0_BASE
|
||||||
R_SYSTEM->PRCR = (uint16_t) BSP_PRV_PRCR_PRC1_UNLOCK;
|
R_MSTP->MSTPCRB &= ~(1U << 12U); // HS
|
||||||
R_MSTP->MSTPCRB &= ~(1U << 11U);
|
#endif
|
||||||
R_SYSTEM->PRCR = (uint16_t) BSP_PRV_PRCR_LOCK;
|
|
||||||
|
|
||||||
#if CFG_TUSB_OS == OPT_OS_FREERTOS
|
#if CFG_TUSB_OS == OPT_OS_FREERTOS
|
||||||
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
|
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
|
||||||
@ -108,6 +108,8 @@ void board_init(void)
|
|||||||
#if CFG_TUSB_OS == OPT_OS_NONE
|
#if CFG_TUSB_OS == OPT_OS_NONE
|
||||||
SysTick_Config(SystemCoreClock / 1000);
|
SysTick_Config(SystemCoreClock / 1000);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
board_led_write(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void board_led_write(bool state) {
|
void board_led_write(bool state) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user