From 7fc99a9e1104703566945ace1b2e1ed59819ba48 Mon Sep 17 00:00:00 2001 From: HiFiPhile Date: Wed, 10 Mar 2021 10:19:45 +0100 Subject: [PATCH 01/72] Call One time tu_fifo_write_n on cdcd_xfer_cb Signed-off-by: HiFiPhile --- src/class/cdc/cdc_device.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/class/cdc/cdc_device.c b/src/class/cdc/cdc_device.c index 5a74b487..64cb4ab2 100644 --- a/src/class/cdc/cdc_device.c +++ b/src/class/cdc/cdc_device.c @@ -432,25 +432,25 @@ bool cdcd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_ // Received new data if ( ep_addr == p_cdc->ep_out ) { + tu_fifo_write_n(&p_cdc->rx_ff, &p_cdc->epout_buf, xferred_bytes); + // TODO search for wanted char first for better performance - for(uint32_t i=0; irx_ff, &p_cdc->epout_buf[i]); - + if (tud_cdc_rx_wanted_cb && ( ((signed char) p_cdc->wanted_char) != -1)) { // Check for wanted char and invoke callback if needed - if ( tud_cdc_rx_wanted_cb && ( ((signed char) p_cdc->wanted_char) != -1 ) && ( p_cdc->wanted_char == p_cdc->epout_buf[i] ) ) - { - tud_cdc_rx_wanted_cb(itf, p_cdc->wanted_char); + for (uint32_t i=0; iwanted_char == p_cdc->epout_buf[i] ) { + tud_cdc_rx_wanted_cb(itf, p_cdc->wanted_char); + } } } - + // invoke receive callback (if there is still data) if (tud_cdc_rx_cb && tu_fifo_count(&p_cdc->rx_ff) ) tud_cdc_rx_cb(itf); - + // prepare for OUT transaction _prep_out_transaction(p_cdc); } - + // Data sent to host, we continue to fetch from tx fifo to send. // Note: This will cause incorrect baudrate set in line coding. // Though maybe the baudrate is not really important !!! From 5caad485f199ab6acfa237d84bf3d84cf41dcfdd Mon Sep 17 00:00:00 2001 From: HiFiPhile Date: Thu, 11 Mar 2021 20:36:46 +0100 Subject: [PATCH 02/72] Add fifo empty check. Signed-off-by: HiFiPhile --- src/class/cdc/cdc_device.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/class/cdc/cdc_device.c b/src/class/cdc/cdc_device.c index 64cb4ab2..d9b098bb 100644 --- a/src/class/cdc/cdc_device.c +++ b/src/class/cdc/cdc_device.c @@ -434,11 +434,10 @@ bool cdcd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_ { tu_fifo_write_n(&p_cdc->rx_ff, &p_cdc->epout_buf, xferred_bytes); - // TODO search for wanted char first for better performance + // Check for wanted char and invoke callback if needed if (tud_cdc_rx_wanted_cb && ( ((signed char) p_cdc->wanted_char) != -1)) { - // Check for wanted char and invoke callback if needed for (uint32_t i=0; iwanted_char == p_cdc->epout_buf[i] ) { + if ( p_cdc->wanted_char == p_cdc->epout_buf[i] && tu_fifo_count(&p_cdc->rx_ff) ) { tud_cdc_rx_wanted_cb(itf, p_cdc->wanted_char); } } From 31373fd55cefced35cfaaa61fb8f9aa3e5ec0bc6 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 12 Mar 2021 12:55:18 +0700 Subject: [PATCH 03/72] use !tu_fifo_empty() instead of tu_fifo_count() --- src/class/cdc/cdc_device.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/class/cdc/cdc_device.c b/src/class/cdc/cdc_device.c index d9b098bb..c24edb75 100644 --- a/src/class/cdc/cdc_device.c +++ b/src/class/cdc/cdc_device.c @@ -95,7 +95,8 @@ static void _prep_out_transaction (cdcd_interface_t* p_cdc) // fifo can be changed before endpoint is claimed available = tu_fifo_remaining(&p_cdc->rx_ff); - if ( available >= sizeof(p_cdc->epout_buf) ) { + if ( available >= sizeof(p_cdc->epout_buf) ) + { usbd_edpt_xfer(rhport, p_cdc->ep_out, p_cdc->epout_buf, sizeof(p_cdc->epout_buf)); }else { @@ -435,16 +436,19 @@ bool cdcd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_ tu_fifo_write_n(&p_cdc->rx_ff, &p_cdc->epout_buf, xferred_bytes); // Check for wanted char and invoke callback if needed - if (tud_cdc_rx_wanted_cb && ( ((signed char) p_cdc->wanted_char) != -1)) { - for (uint32_t i=0; iwanted_char == p_cdc->epout_buf[i] && tu_fifo_count(&p_cdc->rx_ff) ) { + if ( tud_cdc_rx_wanted_cb && (((signed char) p_cdc->wanted_char) != -1) ) + { + for ( uint32_t i = 0; i < xferred_bytes; i++ ) + { + if ( (p_cdc->wanted_char == p_cdc->epout_buf[i]) && !tu_fifo_empty(&p_cdc->rx_ff) ) + { tud_cdc_rx_wanted_cb(itf, p_cdc->wanted_char); } } } // invoke receive callback (if there is still data) - if (tud_cdc_rx_cb && tu_fifo_count(&p_cdc->rx_ff) ) tud_cdc_rx_cb(itf); + if (tud_cdc_rx_cb && !tu_fifo_empty(&p_cdc->rx_ff) ) tud_cdc_rx_cb(itf); // prepare for OUT transaction _prep_out_transaction(p_cdc); From 3a27a9405f3354468c9ff8ae2ddd5d350e1ce19a Mon Sep 17 00:00:00 2001 From: Ha Thach Date: Fri, 12 Mar 2021 15:10:47 +0700 Subject: [PATCH 04/72] Release 0.9.0 (#716) * update change log for release * move changelog into docs/ * more changelog * increase macro version --- changelog.md => docs/changelog.md | 103 ++++++++++++++++++++++++++++-- src/tusb_option.h | 2 +- 2 files changed, 100 insertions(+), 5 deletions(-) rename changelog.md => docs/changelog.md (76%) diff --git a/changelog.md b/docs/changelog.md similarity index 76% rename from changelog.md rename to docs/changelog.md index d645b4fb..0e5f12e8 100644 --- a/changelog.md +++ b/docs/changelog.md @@ -1,10 +1,105 @@ # TinyUSB Changelog -## WIP +## 0.9.0 - 2021.03.12 + +### Device Stack + +#### Device Controller Driver (DCD) + +RP2040 + +- Fix endpoint buffer reallocation overrun problem +- Fix osal_pico queue overflow in initialization +- Fix Isochronous endpoint buffer size in transfer +- Optimize hardware endpoint struct to reduce RAM usage +- Fix enum walkaround forever check for SE0 when pull up is disabled + +Sony CXD56 + +- Pass the correct speed on Spresense +- Fix setup processed flag + +NXP Transdimention + +- Update dcd_init() to reset controller to device mode + +#### USB Device Driver (USBD) + +- Fix issue with status zlp (tud_control_status) is returned by class driver with SET/CLEAR_FEATURE for endpoint. +- Correct endpoint size check for fullspeed bulk, can be 8, 16, 32, 64 +- Ack SET_INTERFACE even if it is not implemented by class driver. + +#### Device Class Driver + +DFU Runtime + +- rename dfu_rt to dfu_runtime for easy reading + +CDC + +- Add tud_cdc_send_break_cb() to support break request +- Improve CDC receive, minor behavior changes: when tud_cdc_rx_wanted_cb() is invoked wanted_char may not be the last byte in the fifo + +HID + +- [Breaking] Add itf argument to hid API to support multiple instances, follow API has signature changes + - tud_hid_descriptor_report_cb() + - tud_hid_get_report_cb() + - tud_hid_set_report_cb() + - tud_hid_boot_mode_cb() + - tud_hid_set_idle_cb() +- Add report complete callback tud_hid_report_complete_cb() API +- Add DPad/Hat support for HID Gamepad + - TUD_HID_REPORT_DESC_GAMEPAD() now support 16 buttons, 2 joysticks, 1 hat/dpad + - Add hid_gamepad_report_t along with GAMEPAD_BUTTON_ and GAMEPAD_HAT_ enum + - Add Gamepad to hid_composite / hid_composite_freertos example + +MIDI - Fix dropping MIDI sysex message when fifo is full -- Add DPad/Hat support for HID Gamepad -- Add tud_hid_report_complete_cb() API +- Fix typo in tud_midi_write24(), make example less ambigous for cable and channel +- Fix incorrect endpoint descriptor length, MIDI v1 use Audio v1 which has 9-byte endpoint descriptor (instead of 7) + +### Host Stack + +#### Host Controller Driver (HCD) + +- Add rhport to hcd_init() +- Improve EHCI/OHCI driver abstraction + - Move echi/ohci files to portable/ + - Rename hcd_lpc18_43 to hcd_transdimension + - Sub hcd API with hcd_ehci_init(), hcd_ehci_register_addr() +- Update NXP transdimention hcd_init() to reset controller to host mode + - Ported hcd to rt10xx + +#### USB Host Driver (USBH) + +- No noticeable changes to usbh + +#### Host Class Driver + +MSC + +- Rename tuh_msc_scsi_inquiry() to tuh_msc_inquiry() +- Rename tuh_msc_mounted_cb/tuh_msc_unmounted_cb to tuh_msc_mount_cb/tuh_msc_unmount_cb to match device stack naming +- Change tuh_msc_is_busy() to tuh_msc_ready() +- Add read10 and write10 function: tuh_msc_read10(), tuh_msc_write10() +- Read_Capacity is invoked as part of enumeration process +- Add tuh_msc_get_block_count(), tuh_msc_get_block_size() +- Add CFG_TUH_MSC_MAXLUN (default to 4) to hold lun capacities + +### Others + +- Add basic support for rt-thread OS +- Change zero bitfield length to more explicit padding +- Build example now fetch required submodules on the fly while running `make` without prio submodule init for mcu drivers +- Update pico-sdk to v1.1.0 + +**New Boards** + +- Microchip SAM E54 Xplained Pro +- LPCXpresso 55s28 +- LPCXpresso 18s37 ## 0.8.0 - 2021.02.05 @@ -26,7 +121,7 @@ ### USB Device -**UBSD** +**USBD** - Rework usbd control transfer to have additional stage parameter for setup, data, status - Fix tusb_init() return true instead of TUSB_ERROR_NONE diff --git a/src/tusb_option.h b/src/tusb_option.h index 6cbdefbf..cafe9e52 100644 --- a/src/tusb_option.h +++ b/src/tusb_option.h @@ -28,7 +28,7 @@ #define _TUSB_OPTION_H_ #define TUSB_VERSION_MAJOR 0 -#define TUSB_VERSION_MINOR 8 +#define TUSB_VERSION_MINOR 9 #define TUSB_VERSION_REVISION 0 #define TUSB_VERSION_STRING TU_STRING(TUSB_VERSION_MAJOR) "." TU_STRING(TUSB_VERSION_MINOR) "." TU_STRING(TUSB_VERSION_REVISION) From bcf9c8cb27d223e2b0078daf7e3311db3bb4bd82 Mon Sep 17 00:00:00 2001 From: Jean Gressmann Date: Thu, 11 Mar 2021 18:19:08 +0100 Subject: [PATCH 05/72] SAM E54 XPlained Pro: free up DPLL1 for application --- hw/bsp/same54xplainedpro/board.mk | 5 +-- hw/bsp/same54xplainedpro/same54xplainedpro.c | 47 +++++++++++++------- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/hw/bsp/same54xplainedpro/board.mk b/hw/bsp/same54xplainedpro/board.mk index 508ab20f..1200fd9f 100644 --- a/hw/bsp/same54xplainedpro/board.mk +++ b/hw/bsp/same54xplainedpro/board.mk @@ -13,11 +13,10 @@ CFLAGS += \ -D__SAME54P20A__ \ -DCONF_CPU_FREQUENCY=$(CONF_CPU_FREQUENCY) \ -DCFG_TUSB_MCU=OPT_MCU_SAME5X \ + -DSAME54XPLAINEDPRO=1 \ + -DBOARD_NAME="\"Microchip SAM E54 Xplained Pro\"" - -# -DSVC_Handler=SVCall_Handler - # All source paths should be relative to the top level. LD_FILE = hw/bsp/$(BOARD)/same54p20a_flash.ld diff --git a/hw/bsp/same54xplainedpro/same54xplainedpro.c b/hw/bsp/same54xplainedpro/same54xplainedpro.c index a1d92075..0bdd477d 100644 --- a/hw/bsp/same54xplainedpro/same54xplainedpro.c +++ b/hw/bsp/same54xplainedpro/same54xplainedpro.c @@ -58,7 +58,6 @@ void USB_3_Handler(void) #define LED_PIN PIN_PC18 #define BUTTON_PIN PIN_PB31 #define BOARD_SERCOM SERCOM2 -#define BOARD_NAME "Microchip SAM E54 Xplained Pro" static inline void init_clock(void) { @@ -72,16 +71,11 @@ static inline void init_clock(void) OSCCTRL_XOSCCTRL_ENABLE; while(0 == OSCCTRL->STATUS.bit.XOSCRDY1); - OSCCTRL->Dpll[0].DPLLCTRLB.reg = OSCCTRL_DPLLCTRLB_DIV(5) | OSCCTRL_DPLLCTRLB_REFCLK_XOSC1; /* 12MHz / 12 = 1Mhz, input = XOSC1 */ - OSCCTRL->Dpll[0].DPLLRATIO.reg = OSCCTRL_DPLLRATIO_LDRFRAC(0x0) | OSCCTRL_DPLLRATIO_LDR((CONF_CPU_FREQUENCY / 1000000)-1); /* multiply to get CONF_CPU_FREQUENCY (default = 120MHz) */ + OSCCTRL->Dpll[0].DPLLCTRLB.reg = OSCCTRL_DPLLCTRLB_DIV(2) | OSCCTRL_DPLLCTRLB_REFCLK_XOSC1; /* 12MHz / 6 = 2Mhz, input = XOSC1 */ + OSCCTRL->Dpll[0].DPLLRATIO.reg = OSCCTRL_DPLLRATIO_LDRFRAC(0x0) | OSCCTRL_DPLLRATIO_LDR((CONF_CPU_FREQUENCY / 1000000 / 2) - 1); /* multiply to get CONF_CPU_FREQUENCY (default = 120MHz) */ OSCCTRL->Dpll[0].DPLLCTRLA.reg = OSCCTRL_DPLLCTRLA_RUNSTDBY | OSCCTRL_DPLLCTRLA_ENABLE; while(0 == OSCCTRL->Dpll[0].DPLLSTATUS.bit.CLKRDY); /* wait for the PLL0 to be ready */ - OSCCTRL->Dpll[1].DPLLCTRLB.reg = OSCCTRL_DPLLCTRLB_DIV(5) | OSCCTRL_DPLLCTRLB_REFCLK_XOSC1; /* 12MHz / 12 = 1Mhz, input = XOSC1 */ - OSCCTRL->Dpll[1].DPLLRATIO.reg = OSCCTRL_DPLLRATIO_LDRFRAC(0x0) | OSCCTRL_DPLLRATIO_LDR(47); /* multiply by 48 -> 48 MHz */ - OSCCTRL->Dpll[1].DPLLCTRLA.reg = OSCCTRL_DPLLCTRLA_RUNSTDBY | OSCCTRL_DPLLCTRLA_ENABLE; - while(0 == OSCCTRL->Dpll[1].DPLLSTATUS.bit.CLKRDY); /* wait for the PLL1 to be ready */ - /* configure clock-generator 0 to use DPLL0 as source -> GCLK0 is used for the core */ GCLK->GENCTRL[0].reg = GCLK_GENCTRL_DIV(0) | @@ -91,14 +85,37 @@ static inline void init_clock(void) GCLK_GENCTRL_IDC; while(1 == GCLK->SYNCBUSY.bit.GENCTRL0); /* wait for the synchronization between clock domains to be complete */ - /* configure clock-generator 1 to use DPLL1 as source -> for use with some peripheral */ - GCLK->GENCTRL[1].reg = + // configure GCLK2 for 12MHz from XOSC1 + GCLK->GENCTRL[2].reg = GCLK_GENCTRL_DIV(0) | GCLK_GENCTRL_RUNSTDBY | GCLK_GENCTRL_GENEN | - GCLK_GENCTRL_SRC_DPLL1 | - GCLK_GENCTRL_IDC ; - while(1 == GCLK->SYNCBUSY.bit.GENCTRL1); /* wait for the synchronization between clock domains to be complete */ + GCLK_GENCTRL_SRC_XOSC1 | + GCLK_GENCTRL_IDC; + while(1 == GCLK->SYNCBUSY.bit.GENCTRL2); /* wait for the synchronization between clock domains to be complete */ + + /* setup DFLL48M to use GLCK2 */ + GCLK->PCHCTRL[OSCCTRL_GCLK_ID_DFLL48].reg = GCLK_PCHCTRL_GEN_GCLK2 | GCLK_PCHCTRL_CHEN; + + OSCCTRL->DFLLCTRLA.reg = 0; + while(1 == OSCCTRL->DFLLSYNC.bit.ENABLE); + + OSCCTRL->DFLLCTRLB.reg = OSCCTRL_DFLLCTRLB_MODE | OSCCTRL_DFLLCTRLB_WAITLOCK; + OSCCTRL->DFLLMUL.bit.MUL = 4; // 4 * 12MHz -> 48MHz + + OSCCTRL->DFLLCTRLA.reg = + OSCCTRL_DFLLCTRLA_ENABLE | + OSCCTRL_DFLLCTRLA_RUNSTDBY; + while(1 == OSCCTRL->DFLLSYNC.bit.ENABLE); + + // setup 48 MHz GCLK3 from DFLL48M + GCLK->GENCTRL[3].reg = + GCLK_GENCTRL_DIV(0) | + GCLK_GENCTRL_RUNSTDBY | + GCLK_GENCTRL_GENEN | + GCLK_GENCTRL_SRC_DFLL | + GCLK_GENCTRL_IDC; + while(1 == GCLK->SYNCBUSY.bit.GENCTRL3); } static inline void uart_init(void) @@ -107,7 +124,7 @@ static inline void uart_init(void) gpio_set_pin_function(PIN_PB25, PINMUX_PB25D_SERCOM2_PAD0); MCLK->APBBMASK.bit.SERCOM2_ = 1; - GCLK->PCHCTRL[SERCOM2_GCLK_ID_CORE].reg = GCLK_PCHCTRL_GEN_GCLK1 | GCLK_PCHCTRL_CHEN; /* setup SERCOM to use GLCK1 -> 48MHz */ + GCLK->PCHCTRL[SERCOM2_GCLK_ID_CORE].reg = GCLK_PCHCTRL_GEN_GCLK3 | GCLK_PCHCTRL_CHEN; BOARD_SERCOM->USART.CTRLA.bit.SWRST = 1; /* reset and disable SERCOM -> enable configuration */ while (BOARD_SERCOM->USART.SYNCBUSY.bit.SWRST); @@ -201,7 +218,7 @@ void board_init(void) * The USB module requires a GCLK_USB of 48 MHz ~ 0.25% clock * for low speed and full speed operation. */ - hri_gclk_write_PCHCTRL_reg(GCLK, USB_GCLK_ID, GCLK_PCHCTRL_GEN_GCLK1_Val | GCLK_PCHCTRL_CHEN); + hri_gclk_write_PCHCTRL_reg(GCLK, USB_GCLK_ID, GCLK_PCHCTRL_GEN_GCLK3_Val | GCLK_PCHCTRL_CHEN); hri_mclk_set_AHBMASK_USB_bit(MCLK); hri_mclk_set_APBBMASK_USB_bit(MCLK); From 01ec0d49ca24cda458d4c2fa4bb5f751ebd4b336 Mon Sep 17 00:00:00 2001 From: Jean Gressmann Date: Thu, 11 Mar 2021 18:20:58 +0100 Subject: [PATCH 06/72] SAM E54 XPlained Pro: use proper defines SPI->USART for board init --- hw/bsp/same54xplainedpro/same54xplainedpro.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/bsp/same54xplainedpro/same54xplainedpro.c b/hw/bsp/same54xplainedpro/same54xplainedpro.c index 0bdd477d..70ea7d43 100644 --- a/hw/bsp/same54xplainedpro/same54xplainedpro.c +++ b/hw/bsp/same54xplainedpro/same54xplainedpro.c @@ -144,7 +144,7 @@ static inline void uart_init(void) // BOARD_SERCOM->USART.BAUD.reg = SERCOM_USART_BAUD_FRAC_FP(0) | SERCOM_USART_BAUD_FRAC_BAUD(26); /* 48000000/(16*115200) = 26.041666667 */ BOARD_SERCOM->USART.BAUD.reg = SERCOM_USART_BAUD_BAUD(63019); /* 65536*(1−16*115200/48000000) */ - BOARD_SERCOM->SPI.CTRLA.bit.ENABLE = 1; /* activate SERCOM */ + BOARD_SERCOM->USART.CTRLA.bit.ENABLE = 1; /* activate SERCOM */ while (BOARD_SERCOM->USART.SYNCBUSY.bit.ENABLE); /* wait for SERCOM to be ready */ } @@ -152,7 +152,7 @@ static inline void uart_send_buffer(uint8_t const *text, size_t len) { for (size_t i = 0; i < len; ++i) { BOARD_SERCOM->USART.DATA.reg = text[i]; - while((BOARD_SERCOM->USART.INTFLAG.reg & SERCOM_SPI_INTFLAG_TXC) == 0); + while((BOARD_SERCOM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_TXC) == 0); } } @@ -160,7 +160,7 @@ static inline void uart_send_str(const char* text) { while (*text) { BOARD_SERCOM->USART.DATA.reg = *text++; - while((BOARD_SERCOM->USART.INTFLAG.reg & SERCOM_SPI_INTFLAG_TXC) == 0); + while((BOARD_SERCOM->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_TXC) == 0); } } From 82e24306e2b0588e944476d71815f83ca392d1b9 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 16 Mar 2021 15:49:09 +0700 Subject: [PATCH 07/72] fix build with OPT_MCU_LPC177X_8X --- src/portable/nxp/lpc17_40/dcd_lpc17_40.c | 3 ++- src/portable/nxp/lpc17_40/dcd_lpc17_40.h | 6 +++--- src/portable/nxp/lpc17_40/hcd_lpc17_40.c | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/portable/nxp/lpc17_40/dcd_lpc17_40.c b/src/portable/nxp/lpc17_40/dcd_lpc17_40.c index 7d867aab..519d0915 100644 --- a/src/portable/nxp/lpc17_40/dcd_lpc17_40.c +++ b/src/portable/nxp/lpc17_40/dcd_lpc17_40.c @@ -26,7 +26,8 @@ #include "tusb_option.h" -#if TUSB_OPT_DEVICE_ENABLED && (CFG_TUSB_MCU == OPT_MCU_LPC175X_6X || CFG_TUSB_MCU == OPT_MCU_LPC40XX) +#if TUSB_OPT_DEVICE_ENABLED && \ + (CFG_TUSB_MCU == OPT_MCU_LPC175X_6X || CFG_TUSB_MCU == OPT_MCU_LPC177X_8X || CFG_TUSB_MCU == OPT_MCU_LPC40XX) #include "device/dcd.h" #include "dcd_lpc17_40.h" diff --git a/src/portable/nxp/lpc17_40/dcd_lpc17_40.h b/src/portable/nxp/lpc17_40/dcd_lpc17_40.h index 1e7c0fbc..07daa32e 100644 --- a/src/portable/nxp/lpc17_40/dcd_lpc17_40.h +++ b/src/portable/nxp/lpc17_40/dcd_lpc17_40.h @@ -24,8 +24,8 @@ * This file is part of the TinyUSB stack. */ -#ifndef _TUSB_DCD_LPC175X_6X_H_ -#define _TUSB_DCD_LPC175X_6X_H_ +#ifndef _TUSB_DCD_LPC17_40_H_ +#define _TUSB_DCD_LPC17_40_H_ #include "common/tusb_common.h" @@ -149,4 +149,4 @@ enum { } #endif -#endif /* _TUSB_DCD_LPC175X_6X_H_ */ +#endif diff --git a/src/portable/nxp/lpc17_40/hcd_lpc17_40.c b/src/portable/nxp/lpc17_40/hcd_lpc17_40.c index 537b3dab..1c1faed9 100644 --- a/src/portable/nxp/lpc17_40/hcd_lpc17_40.c +++ b/src/portable/nxp/lpc17_40/hcd_lpc17_40.c @@ -26,7 +26,8 @@ #include "tusb_option.h" -#if (CFG_TUSB_MCU == OPT_MCU_LPC175X_6X || CFG_TUSB_MCU == OPT_MCU_LPC40XX) +#if TUSB_OPT_HOST_ENABLED && \ + (CFG_TUSB_MCU == OPT_MCU_LPC175X_6X || CFG_TUSB_MCU == OPT_MCU_LPC177X_8X || CFG_TUSB_MCU == OPT_MCU_LPC40XX) #include "chip.h" From 62d4652f86516e1fdd7fa79a29535cf39b2ab2f1 Mon Sep 17 00:00:00 2001 From: Michael Bruno Date: Tue, 16 Mar 2021 10:48:42 -0400 Subject: [PATCH 08/72] Update usbtmc_device.c Fix buffer alignment in TMC device class --- src/class/usbtmc/usbtmc_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/class/usbtmc/usbtmc_device.c b/src/class/usbtmc/usbtmc_device.c index 88776d16..6c9b4244 100644 --- a/src/class/usbtmc/usbtmc_device.c +++ b/src/class/usbtmc/usbtmc_device.c @@ -131,9 +131,9 @@ typedef struct uint8_t ep_int_in; // IN buffer is only used for first packet, not the remainder // in order to deal with prepending header - uint8_t ep_bulk_in_buf[USBTMCD_MAX_PACKET_SIZE]; + CFG_TUSB_MEM_ALIGN uint8_t ep_bulk_in_buf[USBTMCD_MAX_PACKET_SIZE]; // OUT buffer receives one packet at a time - uint8_t ep_bulk_out_buf[USBTMCD_MAX_PACKET_SIZE]; + CFG_TUSB_MEM_ALIGN uint8_t ep_bulk_out_buf[USBTMCD_MAX_PACKET_SIZE]; uint32_t transfer_size_remaining; // also used for requested length for bulk IN. uint32_t transfer_size_sent; // To keep track of data bytes that have been queued in FIFO (not header bytes) From dc2f00cca157dc2279f917f59f9607fcd17b3fdb Mon Sep 17 00:00:00 2001 From: Jeremiah McCarthy Date: Tue, 16 Mar 2021 17:04:40 -0400 Subject: [PATCH 09/72] Add Linux support to tmc example Replaces visa include with pyvisa, as visa use with PyVISA is being deprecated. --- examples/device/usbtmc/visaQuery.py | 38 +++++++++++++++++------------ 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/examples/device/usbtmc/visaQuery.py b/examples/device/usbtmc/visaQuery.py index b5bf8d48..3f46b98e 100644 --- a/examples/device/usbtmc/visaQuery.py +++ b/examples/device/usbtmc/visaQuery.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -import visa +import pyvisa as visa import time import sys @@ -36,8 +36,8 @@ def test_trig(): time.sleep(0.3) # SRQ may have some delay assert (inst.read_stb() & 0x40), "SRQ not set after 0.3 seconds" assert (inst.read_stb() == 0) - - + + def test_mav(): inst.write("delay 50") inst.read_stb() # clear STB @@ -45,15 +45,15 @@ def test_mav(): inst.write("123") time.sleep(0.3) assert (inst.read_stb() & 0x10), "MAV not set after 0.5 seconds" - + rsp = inst.read() assert(rsp == "123\r\n") - - + + def test_srq(): assert (inst.read_stb() == 0) inst.write("123") - + #inst.enable_event(visa.constants.VI_EVENT_SERVICE_REQ, visa.constants.VI_QUEUE) #waitrsp = inst.wait_on_event(visa.constants.VI_EVENT_SERVICE_REQ, 5000) #inst.discard_events(visa.constants.VI_EVENT_SERVICE_REQ, visa.constants.VI_QUEUE) @@ -64,7 +64,7 @@ def test_srq(): assert (stb == 0x50),msg assert (inst.read_stb() == 0x10), "SRQ set at second read!" - + rsp = inst.read() assert(rsp == "123\r\n") @@ -110,14 +110,14 @@ def test_abort_in(): inst.timeout = 800 y = inst.read() assert(y == "xxx\r\n") - + def test_indicate(): # perform indicator pulse usb_iface = inst.get_visa_attribute(visa.constants.VI_ATTR_USB_INTFC_NUM) retv = inst.control_in(request_type_bitmap_field=0xA1, request_id=64, request_value=0x0000, index=usb_iface, length=0x0001) assert((retv[1] == visa.constants.StatusCode(0)) and (retv[0] == b'\x01')), f"indicator pulse failed: retv={retv}" - - + + def test_multi_read(): old_chunk_size = inst.chunk_size longstr = "0123456789abcdefghijklmnopqrstuvwxyz" * 10 @@ -129,7 +129,7 @@ def test_multi_read(): y = inst.read() assert (x + "\r\n" == y) #inst.chunk_size = old_chunk_size - + def test_stall_ep0(): usb_iface = inst.get_visa_attribute(visa.constants.VI_ATTR_USB_INTFC_NUM) inst.read_stb() @@ -139,17 +139,25 @@ def test_stall_ep0(): assert false except visa.VisaIOError: pass - + assert (inst.read_stb() == 0) +os = sys.platform +if os == "linux" or os == "linux2": + rm = visa.ResourceManager("@py") +elif os == "darwin": + ## Not tested + print("Mac not tested\n"); + sys.exit() +elif os == "win32": + rm = visa.ResourceManager("/c/Windows/system32/visa64.dll") -rm = visa.ResourceManager("/c/Windows/system32/visa64.dll") reslist = rm.list_resources("USB?::?*::INSTR") print(reslist) if (len(reslist) == 0): sys.exit() - + inst = rm.open_resource(reslist[0]); inst.timeout = 3000 From ed8f117dd10ecaee1b8169f0c4af5217e03a4951 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 17 Mar 2021 16:52:07 +0700 Subject: [PATCH 10/72] explicitly add dcd source file without vendor/family --- .../device/net_lwip_webserver/src/usb_descriptors.c | 1 - examples/rules.mk | 3 +-- hw/bsp/d5035_01/board.mk | 7 ++----- hw/bsp/da14695_dk_usb/board.mk | 9 +++------ hw/bsp/da1469x_dk_pro/board.mk | 9 +++------ hw/bsp/ea4088qs/board.mk | 5 +---- hw/bsp/ea4357/board.mk | 5 +---- hw/bsp/fomu/family.mk | 6 ++---- hw/bsp/frdm_kl25z/board.mk | 5 +---- hw/bsp/imxrt/family.mk | 5 +---- hw/bsp/lpc18/family.mk | 5 +---- hw/bsp/lpc55/family.mk | 5 +---- hw/bsp/lpcxpresso11u37/board.mk | 5 +---- hw/bsp/lpcxpresso11u68/board.mk | 5 +---- hw/bsp/lpcxpresso1347/board.mk | 5 +---- hw/bsp/lpcxpresso1549/board.mk | 5 +---- hw/bsp/lpcxpresso1769/board.mk | 5 +---- hw/bsp/lpcxpresso51u68/board.mk | 5 +---- hw/bsp/lpcxpresso54114/board.mk | 5 +---- hw/bsp/mbed1768/board.mk | 5 +---- hw/bsp/msp430/family.mk | 10 ++-------- hw/bsp/ngx4330/board.mk | 5 +---- hw/bsp/nrf/family.mk | 5 +---- hw/bsp/nutiny_nuc121s/board.mk | 5 +---- hw/bsp/nutiny_nuc125s/board.mk | 7 ++----- hw/bsp/nutiny_nuc126v/board.mk | 5 +---- hw/bsp/nutiny_sdk_nuc120/board.mk | 5 +---- hw/bsp/nutiny_sdk_nuc505/board.mk | 5 +---- hw/bsp/samd11/family.mk | 5 +---- hw/bsp/samd21/family.mk | 5 +---- hw/bsp/samd51/family.mk | 5 +---- hw/bsp/same54xplainedpro/board.mk | 10 ++-------- hw/bsp/same70_xplained/board.mk | 1 + hw/bsp/samg55xplained/board.mk | 5 +---- hw/bsp/spresense/board.mk | 8 +++----- hw/bsp/stm32f070rbnucleo/board.mk | 5 +---- hw/bsp/stm32f072disco/board.mk | 5 +---- hw/bsp/stm32f103bluepill/board.mk | 5 +---- hw/bsp/stm32f207nucleo/board.mk | 5 +---- hw/bsp/stm32f303disco/board.mk | 5 +---- hw/bsp/stm32f4/family.mk | 5 +---- hw/bsp/stm32f7/family.mk | 5 +---- hw/bsp/stm32h7/family.mk | 5 +---- hw/bsp/stm32l0538disco/board.mk | 5 +---- hw/bsp/stm32l476disco/board.mk | 5 +---- hw/bsp/stm32l4r5nucleo/board.mk | 5 +---- 46 files changed, 56 insertions(+), 190 deletions(-) diff --git a/examples/device/net_lwip_webserver/src/usb_descriptors.c b/examples/device/net_lwip_webserver/src/usb_descriptors.c index f1c0b478..1a77c39d 100644 --- a/examples/device/net_lwip_webserver/src/usb_descriptors.c +++ b/examples/device/net_lwip_webserver/src/usb_descriptors.c @@ -142,7 +142,6 @@ static uint8_t const ecm_configuration[] = // - Windows only works with RNDIS // - MacOS only works with CDC-ECM // - Linux will work on both -// Note index is Num-1x static uint8_t const * const configuration_arr[2] = { [CONFIG_ID_RNDIS] = rndis_configuration, diff --git a/examples/rules.mk b/examples/rules.mk index a97eb566..7f0927a1 100644 --- a/examples/rules.mk +++ b/examples/rules.mk @@ -93,8 +93,7 @@ SRC_C += \ src/class/msc/msc_device.c \ src/class/net/net_device.c \ src/class/usbtmc/usbtmc_device.c \ - src/class/vendor/vendor_device.c \ - src/portable/$(VENDOR)/$(CHIP_FAMILY)/dcd_$(CHIP_FAMILY).c + src/class/vendor/vendor_device.c # TinyUSB stack include INC += $(TOP)/src diff --git a/hw/bsp/d5035_01/board.mk b/hw/bsp/d5035_01/board.mk index dc364a70..b7556f0a 100644 --- a/hw/bsp/d5035_01/board.mk +++ b/hw/bsp/d5035_01/board.mk @@ -22,8 +22,9 @@ CFLAGS += \ LD_FILE = hw/bsp/$(BOARD)/same51j19a_flash.ld SRC_C += \ + src/portable/microchip/samd/dcd_samd.c \ hw/mcu/microchip/same51/gcc/gcc/startup_same51.c \ - hw/mcu/microchip/same51/gcc/system_same51.c \ + hw/mcu/microchip/same51/gcc/system_same51.c ifdef SYSCALLS ifneq ($(SYSCALLS),0) @@ -47,10 +48,6 @@ INC += \ $(TOP)/hw/mcu/microchip/same51/hri \ $(TOP)/hw/mcu/microchip/same51/CMSIS/Include -# For TinyUSB port source -VENDOR = microchip -CHIP_FAMILY = samd - # For freeRTOS port source FREERTOS_PORT = ARM_CM4F diff --git a/hw/bsp/da14695_dk_usb/board.mk b/hw/bsp/da14695_dk_usb/board.mk index 58f3947c..e969c79c 100644 --- a/hw/bsp/da14695_dk_usb/board.mk +++ b/hw/bsp/da14695_dk_usb/board.mk @@ -16,7 +16,9 @@ MCU_FAMILY_DIR = hw/mcu/dialog/da1469x # All source paths should be relative to the top level. LD_FILE = hw/bsp/$(BOARD)/da1469x.ld +# While this is for da1469x chip, there is chance that da1468x chip family will also work SRC_C += \ + src/portable/dialog/da146xx/dcd_da146xx.c \ $(MCU_FAMILY_DIR)/src/system_da1469x.c \ $(MCU_FAMILY_DIR)/src/da1469x_clock.c \ $(MCU_FAMILY_DIR)/src/hal_gpio.c \ @@ -26,12 +28,7 @@ SRC_S += hw/bsp/$(BOARD)/gcc_startup_da1469x.S INC += \ $(TOP)/hw/bsp/$(BOARD) \ $(TOP)/$(MCU_FAMILY_DIR)/include \ - $(TOP)/$(MCU_FAMILY_DIR)/SDK_10.0.8.105/sdk/bsp/include \ - -# For TinyUSB port source -VENDOR = dialog -# While this is for da1469x chip, there is chance that da1468x chip family will also work -CHIP_FAMILY = da146xx + $(TOP)/$(MCU_FAMILY_DIR)/SDK_10.0.8.105/sdk/bsp/include # For freeRTOS port source FREERTOS_PORT = ARM_CM33_NTZ/non_secure diff --git a/hw/bsp/da1469x_dk_pro/board.mk b/hw/bsp/da1469x_dk_pro/board.mk index 5362498e..980fc422 100644 --- a/hw/bsp/da1469x_dk_pro/board.mk +++ b/hw/bsp/da1469x_dk_pro/board.mk @@ -16,7 +16,9 @@ MCU_FAMILY_DIR = hw/mcu/dialog/da1469x # All source paths should be relative to the top level. LD_FILE = hw/bsp/$(BOARD)/da1469x.ld +# While this is for da1469x chip, there is chance that da1468x chip family will also work SRC_C += \ + src/portable/dialog/da146xx/dcd_da146xx.c \ $(MCU_FAMILY_DIR)/src/system_da1469x.c \ $(MCU_FAMILY_DIR)/src/da1469x_clock.c \ $(MCU_FAMILY_DIR)/src/hal_gpio.c \ @@ -26,12 +28,7 @@ SRC_S += hw/bsp/$(BOARD)/gcc_startup_da1469x.S INC += \ $(TOP)/hw/bsp/$(BOARD) \ $(TOP)/$(MCU_FAMILY_DIR)/include \ - $(TOP)/$(MCU_FAMILY_DIR)/SDK_10.0.8.105/sdk/bsp/include \ - -# For TinyUSB port source -VENDOR = dialog -# While this is for da1469x chip, there is chance that da1468x chip family will also work -CHIP_FAMILY = da146xx + $(TOP)/$(MCU_FAMILY_DIR)/SDK_10.0.8.105/sdk/bsp/include # For freeRTOS port source FREERTOS_PORT = ARM_CM33_NTZ/non_secure diff --git a/hw/bsp/ea4088qs/board.mk b/hw/bsp/ea4088qs/board.mk index 51e5babe..ff8bfd40 100644 --- a/hw/bsp/ea4088qs/board.mk +++ b/hw/bsp/ea4088qs/board.mk @@ -22,6 +22,7 @@ MCU_DIR = hw/mcu/nxp/lpcopen/lpc40xx/lpc_chip_40xx LD_FILE = hw/bsp/$(BOARD)/lpc4088.ld SRC_C += \ + src/portable/nxp/lpc17_40/dcd_lpc17_40.c \ $(MCU_DIR)/../gcc/cr_startup_lpc40xx.c \ $(MCU_DIR)/src/chip_17xx_40xx.c \ $(MCU_DIR)/src/clock_17xx_40xx.c \ @@ -35,10 +36,6 @@ SRC_C += \ INC += \ $(TOP)/$(MCU_DIR)/inc -# For TinyUSB port source -VENDOR = nxp -CHIP_FAMILY = lpc17_40 - # For freeRTOS port source FREERTOS_PORT = ARM_CM4F diff --git a/hw/bsp/ea4357/board.mk b/hw/bsp/ea4357/board.mk index 09c782ca..a553938c 100644 --- a/hw/bsp/ea4357/board.mk +++ b/hw/bsp/ea4357/board.mk @@ -21,6 +21,7 @@ MCU_DIR = hw/mcu/nxp/lpcopen/lpc43xx/lpc_chip_43xx LD_FILE = hw/bsp/$(BOARD)/lpc4357.ld SRC_C += \ + src/portable/nxp/transdimension/dcd_transdimension.c \ $(MCU_DIR)/../gcc/cr_startup_lpc43xx.c \ $(MCU_DIR)/src/chip_18xx_43xx.c \ $(MCU_DIR)/src/clock_18xx_43xx.c \ @@ -35,10 +36,6 @@ INC += \ $(TOP)/$(MCU_DIR)/inc \ $(TOP)/$(MCU_DIR)/inc/config_43xx -# For TinyUSB port source -VENDOR = nxp -CHIP_FAMILY = transdimension - # For freeRTOS port source FREERTOS_PORT = ARM_CM4F diff --git a/hw/bsp/fomu/family.mk b/hw/bsp/fomu/family.mk index f615216b..40cb5dd4 100644 --- a/hw/bsp/fomu/family.mk +++ b/hw/bsp/fomu/family.mk @@ -11,15 +11,13 @@ CROSS_COMPILE = riscv-none-embed- # All source paths should be relative to the top level. LD_FILE = $(FAMILY_PATH)/fomu.ld +SRC_C += src/portable/valentyusb/eptri/dcd_eptri.c + SRC_S += $(FAMILY_PATH)/crt0-vexriscv.S INC += \ $(TOP)/$(FAMILY_PATH)/include -# For TinyUSB port source -VENDOR = valentyusb -CHIP_FAMILY = eptri - # For freeRTOS port source FREERTOS_PORT = RISC-V diff --git a/hw/bsp/frdm_kl25z/board.mk b/hw/bsp/frdm_kl25z/board.mk index 5ad4d205..f63b181a 100644 --- a/hw/bsp/frdm_kl25z/board.mk +++ b/hw/bsp/frdm_kl25z/board.mk @@ -16,6 +16,7 @@ MCU_DIR = hw/mcu/nxp/sdk/devices/MKL25Z4 LD_FILE = $(MCU_DIR)/gcc/MKL25Z128xxx4_flash.ld SRC_C += \ + src/portable/nxp/khci/dcd_khci.c \ $(MCU_DIR)/system_MKL25Z4.c \ $(MCU_DIR)/project_template/clock_config.c \ $(MCU_DIR)/drivers/fsl_clock.c \ @@ -31,10 +32,6 @@ INC += \ SRC_S += $(MCU_DIR)/gcc/startup_MKL25Z4.S -# For TinyUSB port source -VENDOR = nxp -CHIP_FAMILY = khci - # For freeRTOS port source FREERTOS_PORT = ARM_CM0 diff --git a/hw/bsp/imxrt/family.mk b/hw/bsp/imxrt/family.mk index c07e68d2..3aeac8e5 100644 --- a/hw/bsp/imxrt/family.mk +++ b/hw/bsp/imxrt/family.mk @@ -27,6 +27,7 @@ LDFLAGS += \ -Wl,--defsym,__stack_size__=0x800 \ SRC_C += \ + src/portable/nxp/transdimension/dcd_transdimension.c \ $(MCU_DIR)/system_$(MCU_VARIANT).c \ $(MCU_DIR)/xip/fsl_flexspi_nor_boot.c \ $(MCU_DIR)/project_template/clock_config.c \ @@ -44,10 +45,6 @@ INC += \ SRC_S += $(MCU_DIR)/gcc/startup_$(MCU_VARIANT).S -# For TinyUSB port source -VENDOR = nxp -CHIP_FAMILY = transdimension - # For freeRTOS port source FREERTOS_PORT = ARM_CM7/r0p1 diff --git a/hw/bsp/lpc18/family.mk b/hw/bsp/lpc18/family.mk index 05ff27c3..f016f1a3 100644 --- a/hw/bsp/lpc18/family.mk +++ b/hw/bsp/lpc18/family.mk @@ -18,6 +18,7 @@ CFLAGS += -Wno-error=unused-parameter -Wno-error=strict-prototypes MCU_DIR = hw/mcu/nxp/lpcopen/lpc18xx/lpc_chip_18xx SRC_C += \ + src/portable/nxp/transdimension/dcd_transdimension.c \ $(MCU_DIR)/../gcc/cr_startup_lpc18xx.c \ $(MCU_DIR)/src/chip_18xx_43xx.c \ $(MCU_DIR)/src/clock_18xx_43xx.c \ @@ -30,9 +31,5 @@ INC += \ $(TOP)/$(MCU_DIR)/inc \ $(TOP)/$(MCU_DIR)/inc/config_18xx -# For TinyUSB port source -VENDOR = nxp -CHIP_FAMILY = transdimension - # For freeRTOS port source FREERTOS_PORT = ARM_CM3 diff --git a/hw/bsp/lpc55/family.mk b/hw/bsp/lpc55/family.mk index 8934cb42..557e3391 100644 --- a/hw/bsp/lpc55/family.mk +++ b/hw/bsp/lpc55/family.mk @@ -34,6 +34,7 @@ MCU_DIR = hw/mcu/nxp/sdk/devices/$(MCU_VARIANT) LD_FILE ?= $(MCU_DIR)/gcc/$(MCU_CORE)_flash.ld SRC_C += \ + src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c \ $(MCU_DIR)/system_$(MCU_CORE).c \ $(MCU_DIR)/drivers/fsl_clock.c \ $(MCU_DIR)/drivers/fsl_gpio.c \ @@ -54,9 +55,5 @@ SRC_S += $(MCU_DIR)/gcc/startup_$(MCU_CORE).S LIBS += $(TOP)/$(MCU_DIR)/gcc/libpower_hardabi.a -# For TinyUSB port source -VENDOR = nxp -CHIP_FAMILY = lpc_ip3511 - # For freeRTOS port source FREERTOS_PORT = ARM_CM33_NTZ/non_secure diff --git a/hw/bsp/lpcxpresso11u37/board.mk b/hw/bsp/lpcxpresso11u37/board.mk index e1338c9a..1f4a4749 100644 --- a/hw/bsp/lpcxpresso11u37/board.mk +++ b/hw/bsp/lpcxpresso11u37/board.mk @@ -22,6 +22,7 @@ MCU_DIR = hw/mcu/nxp/lpcopen/lpc11uxx/lpc_chip_11uxx LD_FILE = hw/bsp/$(BOARD)/lpc11u37.ld SRC_C += \ + src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c \ $(MCU_DIR)/../gcc/cr_startup_lpc11xx.c \ $(MCU_DIR)/src/chip_11xx.c \ $(MCU_DIR)/src/clock_11xx.c \ @@ -33,10 +34,6 @@ SRC_C += \ INC += \ $(TOP)/$(MCU_DIR)/inc -# For TinyUSB port source -VENDOR = nxp -CHIP_FAMILY = lpc_ip3511 - # For freeRTOS port source FREERTOS_PORT = ARM_CM0 diff --git a/hw/bsp/lpcxpresso11u68/board.mk b/hw/bsp/lpcxpresso11u68/board.mk index e038a9cd..d750a7be 100644 --- a/hw/bsp/lpcxpresso11u68/board.mk +++ b/hw/bsp/lpcxpresso11u68/board.mk @@ -19,6 +19,7 @@ MCU_DIR = hw/mcu/nxp/lpcopen/lpc11u6x/lpc_chip_11u6x LD_FILE = hw/bsp/$(BOARD)/lpc11u68.ld SRC_C += \ + src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c \ $(MCU_DIR)/../gcc/cr_startup_lpc11u6x.c \ $(MCU_DIR)/src/chip_11u6x.c \ $(MCU_DIR)/src/clock_11u6x.c \ @@ -30,10 +31,6 @@ SRC_C += \ INC += \ $(TOP)/$(MCU_DIR)/inc -# For TinyUSB port source -VENDOR = nxp -CHIP_FAMILY = lpc_ip3511 - # For freeRTOS port source FREERTOS_PORT = ARM_CM0 diff --git a/hw/bsp/lpcxpresso1347/board.mk b/hw/bsp/lpcxpresso1347/board.mk index 277282b9..93e1c953 100644 --- a/hw/bsp/lpcxpresso1347/board.mk +++ b/hw/bsp/lpcxpresso1347/board.mk @@ -22,6 +22,7 @@ MCU_DIR = hw/mcu/nxp/lpcopen/lpc13xx/lpc_chip_13xx LD_FILE = hw/bsp/$(BOARD)/lpc1347.ld SRC_C += \ + src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c \ $(MCU_DIR)/../gcc/cr_startup_lpc13xx.c \ $(MCU_DIR)/src/chip_13xx.c \ $(MCU_DIR)/src/clock_13xx.c \ @@ -33,10 +34,6 @@ SRC_C += \ INC += \ $(TOP)/$(MCU_DIR)/inc -# For TinyUSB port source -VENDOR = nxp -CHIP_FAMILY = lpc_ip3511 - # For freeRTOS port source FREERTOS_PORT = ARM_CM3 diff --git a/hw/bsp/lpcxpresso1549/board.mk b/hw/bsp/lpcxpresso1549/board.mk index 8d98379d..7daa2ab7 100644 --- a/hw/bsp/lpcxpresso1549/board.mk +++ b/hw/bsp/lpcxpresso1549/board.mk @@ -21,6 +21,7 @@ MCU_DIR = hw/mcu/nxp/lpcopen/lpc15xx/lpc_chip_15xx LD_FILE = hw/bsp/$(BOARD)/lpc1549.ld SRC_C += \ + src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c \ $(MCU_DIR)/../gcc/cr_startup_lpc15xx.c \ $(MCU_DIR)/src/chip_15xx.c \ $(MCU_DIR)/src/clock_15xx.c \ @@ -33,10 +34,6 @@ SRC_C += \ INC += \ $(TOP)/$(MCU_DIR)/inc -# For TinyUSB port source -VENDOR = nxp -CHIP_FAMILY = lpc_ip3511 - # For freeRTOS port source FREERTOS_PORT = ARM_CM3 diff --git a/hw/bsp/lpcxpresso1769/board.mk b/hw/bsp/lpcxpresso1769/board.mk index 4b77ac0c..e67ba16f 100644 --- a/hw/bsp/lpcxpresso1769/board.mk +++ b/hw/bsp/lpcxpresso1769/board.mk @@ -20,6 +20,7 @@ MCU_DIR = hw/mcu/nxp/lpcopen/lpc175x_6x/lpc_chip_175x_6x LD_FILE = hw/bsp/$(BOARD)/lpc1769.ld SRC_C += \ + src/portable/nxp/lpc17_40/dcd_lpc17_40.c \ $(MCU_DIR)/../gcc/cr_startup_lpc175x_6x.c \ $(MCU_DIR)/src/chip_17xx_40xx.c \ $(MCU_DIR)/src/clock_17xx_40xx.c \ @@ -32,10 +33,6 @@ SRC_C += \ INC += \ $(TOP)/$(MCU_DIR)/inc -# For TinyUSB port source -VENDOR = nxp -CHIP_FAMILY = lpc17_40 - # For freeRTOS port source FREERTOS_PORT = ARM_CM3 diff --git a/hw/bsp/lpcxpresso51u68/board.mk b/hw/bsp/lpcxpresso51u68/board.mk index 57af215b..dedc0cc4 100644 --- a/hw/bsp/lpcxpresso51u68/board.mk +++ b/hw/bsp/lpcxpresso51u68/board.mk @@ -19,6 +19,7 @@ MCU_DIR = hw/mcu/nxp/sdk/devices/LPC51U68 LD_FILE = $(MCU_DIR)/gcc/LPC51U68_flash.ld SRC_C += \ + src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c \ $(MCU_DIR)/system_LPC51U68.c \ $(MCU_DIR)/drivers/fsl_clock.c \ $(MCU_DIR)/drivers/fsl_gpio.c \ @@ -34,10 +35,6 @@ SRC_S += $(MCU_DIR)/gcc/startup_LPC51U68.S LIBS += $(TOP)/$(MCU_DIR)/gcc/libpower.a -# For TinyUSB port source -VENDOR = nxp -CHIP_FAMILY = lpc_ip3511 - # For freeRTOS port source FREERTOS_PORT = ARM_CM0 diff --git a/hw/bsp/lpcxpresso54114/board.mk b/hw/bsp/lpcxpresso54114/board.mk index 431ad912..eea6f0c5 100644 --- a/hw/bsp/lpcxpresso54114/board.mk +++ b/hw/bsp/lpcxpresso54114/board.mk @@ -21,6 +21,7 @@ MCU_DIR = hw/mcu/nxp/sdk/devices/LPC54114 LD_FILE = $(MCU_DIR)/gcc/LPC54114J256_cm4_flash.ld SRC_C += \ + src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c \ $(MCU_DIR)/system_LPC54114_cm4.c \ $(MCU_DIR)/drivers/fsl_clock.c \ $(MCU_DIR)/drivers/fsl_gpio.c \ @@ -36,10 +37,6 @@ SRC_S += $(MCU_DIR)/gcc/startup_LPC54114_cm4.S LIBS += $(TOP)/$(MCU_DIR)/gcc/libpower_cm4_hardabi.a -# For TinyUSB port source -VENDOR = nxp -CHIP_FAMILY = lpc_ip3511 - # For freeRTOS port source FREERTOS_PORT = ARM_CM4F diff --git a/hw/bsp/mbed1768/board.mk b/hw/bsp/mbed1768/board.mk index 2b934aa1..eb6c8647 100644 --- a/hw/bsp/mbed1768/board.mk +++ b/hw/bsp/mbed1768/board.mk @@ -20,6 +20,7 @@ MCU_DIR = hw/mcu/nxp/lpcopen/lpc175x_6x/lpc_chip_175x_6x LD_FILE = hw/bsp/$(BOARD)/lpc1768.ld SRC_C += \ + src/portable/nxp/lpc17_40/dcd_lpc17_40.c \ $(MCU_DIR)/../gcc/cr_startup_lpc175x_6x.c \ $(MCU_DIR)/src/chip_17xx_40xx.c \ $(MCU_DIR)/src/clock_17xx_40xx.c \ @@ -32,10 +33,6 @@ SRC_C += \ INC += \ $(TOP)/$(MCU_DIR)/inc -# For TinyUSB port source -VENDOR = nxp -CHIP_FAMILY = lpc17_40 - # For freeRTOS port source FREERTOS_PORT = ARM_CM3 diff --git a/hw/bsp/msp430/family.mk b/hw/bsp/msp430/family.mk index 53ebca1c..913f48cf 100644 --- a/hw/bsp/msp430/family.mk +++ b/hw/bsp/msp430/family.mk @@ -8,23 +8,17 @@ CFLAGS += \ -DCFG_EXAMPLE_MSC_READONLY \ -DCFG_TUD_ENDPOINT0_SIZE=8 -#-mmcu=msp430f5529 - - - # All source paths should be relative to the top level. LD_FILE = hw/mcu/ti/msp430/msp430-gcc-support-files/include/msp430f5529.ld LDINC += $(TOP)/hw/mcu/ti/msp430/msp430-gcc-support-files/include LDFLAGS += $(addprefix -L,$(LDINC)) +SRC_C += src/portable/ti/msp430x5xx/dcd_msp430x5xx.c + INC += \ $(TOP)/hw/mcu/ti/msp430/msp430-gcc-support-files/include \ $(TOP)/$(BOARD_PATH) -# For TinyUSB port source -VENDOR = ti -CHIP_FAMILY = msp430x5xx - # export for libmsp430.so to same installation ifneq ($(OS),Windows_NT) export LD_LIBRARY_PATH=$(dir $(shell which MSP430Flasher)) diff --git a/hw/bsp/ngx4330/board.mk b/hw/bsp/ngx4330/board.mk index c78d4c02..6dbec1ee 100644 --- a/hw/bsp/ngx4330/board.mk +++ b/hw/bsp/ngx4330/board.mk @@ -21,6 +21,7 @@ MCU_DIR = hw/mcu/nxp/lpcopen/lpc43xx/lpc_chip_43xx LD_FILE = hw/bsp/$(BOARD)/ngx4330.ld SRC_C += \ + src/portable/nxp/transdimension/dcd_transdimension.c \ $(MCU_DIR)/../gcc/cr_startup_lpc43xx.c \ $(MCU_DIR)/src/chip_18xx_43xx.c \ $(MCU_DIR)/src/clock_18xx_43xx.c \ @@ -33,10 +34,6 @@ INC += \ $(TOP)/$(MCU_DIR)/inc \ $(TOP)/$(MCU_DIR)/inc/config_43xx -# For TinyUSB port source -VENDOR = nxp -CHIP_FAMILY = transdimension - # For freeRTOS port source FREERTOS_PORT = ARM_CM4F diff --git a/hw/bsp/nrf/family.mk b/hw/bsp/nrf/family.mk index 8756ad9a..8f55fd71 100644 --- a/hw/bsp/nrf/family.mk +++ b/hw/bsp/nrf/family.mk @@ -34,6 +34,7 @@ LD_FILE ?= hw/bsp/nrf/boards/$(BOARD)/nrf52840_s140_v6.ld LDFLAGS += -L$(TOP)/hw/mcu/nordic/nrfx/mdk SRC_C += \ + src/portable/nordic/nrf5x/dcd_nrf5x.c \ hw/mcu/nordic/nrfx/drivers/src/nrfx_power.c \ hw/mcu/nordic/nrfx/drivers/src/nrfx_uarte.c \ hw/mcu/nordic/nrfx/mdk/system_$(MCU_VARIANT).c @@ -52,10 +53,6 @@ SRC_S += hw/mcu/nordic/nrfx/mdk/gcc_startup_$(MCU_VARIANT).S ASFLAGS += -D__HEAP_SIZE=0 -# For TinyUSB port source -VENDOR = nordic -CHIP_FAMILY = nrf5x - # For freeRTOS port source FREERTOS_PORT = ARM_CM4F diff --git a/hw/bsp/nutiny_nuc121s/board.mk b/hw/bsp/nutiny_nuc121s/board.mk index 68688be7..d94af609 100644 --- a/hw/bsp/nutiny_nuc121s/board.mk +++ b/hw/bsp/nutiny_nuc121s/board.mk @@ -14,6 +14,7 @@ CFLAGS += \ LD_FILE = hw/bsp/$(BOARD)/nuc121_flash.ld SRC_C += \ + src/portable/nuvoton/nuc121/dcd_nuc121.c \ hw/mcu/nuvoton/nuc121_125/Device/Nuvoton/NUC121/Source/system_NUC121.c \ hw/mcu/nuvoton/nuc121_125/StdDriver/src/adc.c \ hw/mcu/nuvoton/nuc121_125/StdDriver/src/bpwm.c \ @@ -42,10 +43,6 @@ INC += \ $(TOP)/hw/mcu/nuvoton/nuc121_125/StdDriver/inc \ $(TOP)/hw/mcu/nuvoton/nuc121_125/CMSIS/Include -# For TinyUSB port source -VENDOR = nuvoton -CHIP_FAMILY = nuc121 - # For freeRTOS port source FREERTOS_PORT = ARM_CM0 diff --git a/hw/bsp/nutiny_nuc125s/board.mk b/hw/bsp/nutiny_nuc125s/board.mk index cb75f2ba..6bf10ef0 100644 --- a/hw/bsp/nutiny_nuc125s/board.mk +++ b/hw/bsp/nutiny_nuc125s/board.mk @@ -14,9 +14,10 @@ CFLAGS += \ LD_FILE = hw/bsp/$(BOARD)/nuc125_flash.ld SRC_C += \ + src/portable/nuvoton/nuc121/dcd_nuc121.c \ hw/mcu/nuvoton/nuc121_125/Device/Nuvoton/NUC121/Source/system_NUC121.c \ hw/mcu/nuvoton/nuc121_125/StdDriver/src/clk.c \ - hw/mcu/nuvoton/nuc121_125/StdDriver/src/gpio.c + hw/mcu/nuvoton/nuc121_125/StdDriver/src/gpio.c SRC_S += \ hw/mcu/nuvoton/nuc121_125/Device/Nuvoton/NUC121/Source/GCC/startup_NUC121.S @@ -26,10 +27,6 @@ INC += \ $(TOP)/hw/mcu/nuvoton/nuc121_125/StdDriver/inc \ $(TOP)/hw/mcu/nuvoton/nuc121_125/CMSIS/Include -# For TinyUSB port source -VENDOR = nuvoton -CHIP_FAMILY = nuc121 - # For freeRTOS port source FREERTOS_PORT = ARM_CM0 diff --git a/hw/bsp/nutiny_nuc126v/board.mk b/hw/bsp/nutiny_nuc126v/board.mk index 5beb5f45..d1ccd46a 100644 --- a/hw/bsp/nutiny_nuc126v/board.mk +++ b/hw/bsp/nutiny_nuc126v/board.mk @@ -14,6 +14,7 @@ CFLAGS += \ LD_FILE = hw/bsp/$(BOARD)/nuc126_flash.ld SRC_C += \ + src/portable/nuvoton/nuc121/dcd_nuc121.c \ hw/mcu/nuvoton/nuc126/Device/Nuvoton/NUC126/Source/system_NUC126.c \ hw/mcu/nuvoton/nuc126/StdDriver/src/acmp.c \ hw/mcu/nuvoton/nuc126/StdDriver/src/adc.c \ @@ -46,10 +47,6 @@ INC += \ $(TOP)/hw/mcu/nuvoton/nuc126/StdDriver/inc \ $(TOP)/hw/mcu/nuvoton/nuc126/CMSIS/Include -# For TinyUSB port source -VENDOR = nuvoton -CHIP_FAMILY = nuc121 - # For freeRTOS port source FREERTOS_PORT = ARM_CM0 diff --git a/hw/bsp/nutiny_sdk_nuc120/board.mk b/hw/bsp/nutiny_sdk_nuc120/board.mk index affa6405..bfb71ffb 100644 --- a/hw/bsp/nutiny_sdk_nuc120/board.mk +++ b/hw/bsp/nutiny_sdk_nuc120/board.mk @@ -12,6 +12,7 @@ CFLAGS += \ LD_FILE = hw/bsp/nutiny_sdk_nuc120/nuc120_flash.ld SRC_C += \ + src/portable/nuvoton/nuc120/dcd_nuc120.c \ hw/mcu/nuvoton/nuc100_120/Device/Nuvoton/NUC100Series/Source/system_NUC100Series.c \ hw/mcu/nuvoton/nuc100_120/StdDriver/src/acmp.c \ hw/mcu/nuvoton/nuc100_120/StdDriver/src/adc.c \ @@ -42,10 +43,6 @@ INC += \ $(TOP)/hw/mcu/nuvoton/nuc100_120/StdDriver/inc \ $(TOP)/hw/mcu/nuvoton/nuc100_120/CMSIS/Include -# For TinyUSB port source -VENDOR = nuvoton -CHIP_FAMILY = nuc120 - # For freeRTOS port source FREERTOS_PORT = ARM_CM0 diff --git a/hw/bsp/nutiny_sdk_nuc505/board.mk b/hw/bsp/nutiny_sdk_nuc505/board.mk index 8b2e53d4..51560a4e 100644 --- a/hw/bsp/nutiny_sdk_nuc505/board.mk +++ b/hw/bsp/nutiny_sdk_nuc505/board.mk @@ -13,6 +13,7 @@ CFLAGS += \ LD_FILE = hw/bsp/$(BOARD)/nuc505_flashtoram.ld SRC_C += \ + src/portable/nuvoton/nuc505/dcd_nuc505.c \ hw/mcu/nuvoton/nuc505/Device/Nuvoton/NUC505Series/Source/system_NUC505Series.c \ hw/mcu/nuvoton/nuc505/StdDriver/src/adc.c \ hw/mcu/nuvoton/nuc505/StdDriver/src/clk.c \ @@ -37,10 +38,6 @@ INC += \ $(TOP)/hw/mcu/nuvoton/nuc505/StdDriver/inc \ $(TOP)/hw/mcu/nuvoton/nuc505/CMSIS/Include -# For TinyUSB port source -VENDOR = nuvoton -CHIP_FAMILY = nuc505 - # For freeRTOS port source FREERTOS_PORT = ARM_CM4F diff --git a/hw/bsp/samd11/family.mk b/hw/bsp/samd11/family.mk index e0005d85..653eb706 100644 --- a/hw/bsp/samd11/family.mk +++ b/hw/bsp/samd11/family.mk @@ -12,6 +12,7 @@ CFLAGS += \ -DCFG_TUSB_MCU=OPT_MCU_SAMD11 SRC_C += \ + src/portable/microchip/samd/dcd_samd.c \ hw/mcu/microchip/samd11/gcc/gcc/startup_samd11.c \ hw/mcu/microchip/samd11/gcc/system_samd11.c \ hw/mcu/microchip/samd11/hpl/gclk/hpl_gclk.c \ @@ -32,9 +33,5 @@ INC += \ $(TOP)/hw/mcu/microchip/samd11/CMSIS/Include \ $(TOP)/hw/mcu/microchip/samd11/CMSIS/Core/Include -# For TinyUSB port source -VENDOR = microchip -CHIP_FAMILY = samd - # For freeRTOS port source FREERTOS_PORT = ARM_CM0 diff --git a/hw/bsp/samd21/family.mk b/hw/bsp/samd21/family.mk index e748796f..abd2393a 100644 --- a/hw/bsp/samd21/family.mk +++ b/hw/bsp/samd21/family.mk @@ -13,6 +13,7 @@ CFLAGS += \ -DCFG_TUSB_MCU=OPT_MCU_SAMD21 SRC_C += \ + src/portable/microchip/samd/dcd_samd.c \ hw/mcu/microchip/samd21/gcc/gcc/startup_samd21.c \ hw/mcu/microchip/samd21/gcc/system_samd21.c \ hw/mcu/microchip/samd21/hpl/gclk/hpl_gclk.c \ @@ -32,10 +33,6 @@ INC += \ $(TOP)/hw/mcu/microchip/samd21/hri \ $(TOP)/hw/mcu/microchip/samd21/CMSIS/Include -# For TinyUSB port source -VENDOR = microchip -CHIP_FAMILY = samd - # For freeRTOS port source FREERTOS_PORT = ARM_CM0 diff --git a/hw/bsp/samd51/family.mk b/hw/bsp/samd51/family.mk index 2cf8f090..841708a7 100644 --- a/hw/bsp/samd51/family.mk +++ b/hw/bsp/samd51/family.mk @@ -16,6 +16,7 @@ CFLAGS += \ CFLAGS += -Wno-error=undef SRC_C += \ + src/portable/microchip/samd/dcd_samd.c \ hw/mcu/microchip/samd51/gcc/gcc/startup_samd51.c \ hw/mcu/microchip/samd51/gcc/system_samd51.c \ hw/mcu/microchip/samd51/hpl/gclk/hpl_gclk.c \ @@ -35,10 +36,6 @@ INC += \ $(TOP)/hw/mcu/microchip/samd51/hri \ $(TOP)/hw/mcu/microchip/samd51/CMSIS/Include -# For TinyUSB port source -VENDOR = microchip -CHIP_FAMILY = samd - # For freeRTOS port source FREERTOS_PORT = ARM_CM4F diff --git a/hw/bsp/same54xplainedpro/board.mk b/hw/bsp/same54xplainedpro/board.mk index 508ab20f..2ad4ada0 100644 --- a/hw/bsp/same54xplainedpro/board.mk +++ b/hw/bsp/same54xplainedpro/board.mk @@ -12,9 +12,7 @@ CFLAGS += \ -nostdlib -nostartfiles \ -D__SAME54P20A__ \ -DCONF_CPU_FREQUENCY=$(CONF_CPU_FREQUENCY) \ - -DCFG_TUSB_MCU=OPT_MCU_SAME5X \ - - + -DCFG_TUSB_MCU=OPT_MCU_SAME5X # -DSVC_Handler=SVCall_Handler @@ -22,6 +20,7 @@ CFLAGS += \ LD_FILE = hw/bsp/$(BOARD)/same54p20a_flash.ld SRC_C += \ + src/portable/microchip/samd/dcd_samd.c \ hw/mcu/microchip/same54/gcc/gcc/startup_same54.c \ hw/mcu/microchip/same54/gcc/system_same54.c \ hw/mcu/microchip/same54/hal/utils/src/utils_syscalls.c @@ -36,14 +35,9 @@ INC += \ $(TOP)/hw/mcu/microchip/same54/hri \ $(TOP)/hw/mcu/microchip/same54/CMSIS/Include -# For TinyUSB port source -VENDOR = microchip -CHIP_FAMILY = samd - # For freeRTOS port source FREERTOS_PORT = ARM_CM4F - # For flash-jlink target JLINK_DEVICE = ATSAME54P20 diff --git a/hw/bsp/same70_xplained/board.mk b/hw/bsp/same70_xplained/board.mk index fd9dc5cf..0b3f0387 100644 --- a/hw/bsp/same70_xplained/board.mk +++ b/hw/bsp/same70_xplained/board.mk @@ -19,6 +19,7 @@ ASF_DIR = hw/mcu/microchip/same70 LD_FILE = $(ASF_DIR)/same70b/gcc/gcc/same70q21b_flash.ld SRC_C += \ + src/portable/template/dcd_template.c \ $(ASF_DIR)/same70b/gcc/gcc/startup_same70q21b.c \ $(ASF_DIR)/same70b/gcc/system_same70q21b.c \ $(ASF_DIR)/hpl/core/hpl_init.c \ diff --git a/hw/bsp/samg55xplained/board.mk b/hw/bsp/samg55xplained/board.mk index 3a783d31..1a1a3ffe 100644 --- a/hw/bsp/samg55xplained/board.mk +++ b/hw/bsp/samg55xplained/board.mk @@ -20,6 +20,7 @@ ASF_DIR = hw/mcu/microchip/samg55 LD_FILE = hw/bsp/$(BOARD)/samg55j19_flash.ld SRC_C += \ + src/portable/microchip/samg/dcd_samg.c \ $(ASF_DIR)/samg55/gcc/gcc/startup_samg55.c \ $(ASF_DIR)/samg55/gcc/system_samg55.c \ $(ASF_DIR)/hpl/core/hpl_init.c \ @@ -40,10 +41,6 @@ INC += \ $(TOP)/$(ASF_DIR)/hri \ $(TOP)/$(ASF_DIR)/CMSIS/Core/Include -# For TinyUSB port source -VENDOR = microchip -CHIP_FAMILY = samg - # For freeRTOS port source FREERTOS_PORT = ARM_CM4F diff --git a/hw/bsp/spresense/board.mk b/hw/bsp/spresense/board.mk index c04296cf..37cb957c 100644 --- a/hw/bsp/spresense/board.mk +++ b/hw/bsp/spresense/board.mk @@ -39,6 +39,8 @@ CFLAGS += -Wno-error=shadow SPRESENSE_SDK = $(TOP)/hw/mcu/sony/cxd56/spresense-exported-sdk +SRC_C += src/portable/sony/cxd56/dcd_cxd56.c + INC += \ $(SPRESENSE_SDK)/nuttx/include \ $(SPRESENSE_SDK)/nuttx/arch \ @@ -57,11 +59,7 @@ LDFLAGS += \ -nostartfiles \ -nodefaultlibs \ -Wl,--gc-sections \ - -u spresense_main \ - -# For TinyUSB port source -VENDOR = sony -CHIP_FAMILY = cxd56 + -u spresense_main $(MKSPK): $(BUILD)/$(PROJECT).elf $(MAKE) -C $(TOP)/hw/mcu/sony/cxd56/mkspk diff --git a/hw/bsp/stm32f070rbnucleo/board.mk b/hw/bsp/stm32f070rbnucleo/board.mk index 0cf28b79..1478b282 100644 --- a/hw/bsp/stm32f070rbnucleo/board.mk +++ b/hw/bsp/stm32f070rbnucleo/board.mk @@ -23,6 +23,7 @@ CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align LD_FILE = hw/bsp/$(BOARD)/stm32F070rbtx_flash.ld SRC_C += \ + src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c \ $(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \ @@ -40,10 +41,6 @@ INC += \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) -# For TinyUSB port source -VENDOR = st -CHIP_FAMILY = stm32_fsdev - # For freeRTOS port source FREERTOS_PORT = ARM_CM0 diff --git a/hw/bsp/stm32f072disco/board.mk b/hw/bsp/stm32f072disco/board.mk index 81fb0df8..6f38f481 100644 --- a/hw/bsp/stm32f072disco/board.mk +++ b/hw/bsp/stm32f072disco/board.mk @@ -22,6 +22,7 @@ CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align LD_FILE = hw/bsp/$(BOARD)/STM32F072RBTx_FLASH.ld SRC_C += \ + src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c \ $(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \ @@ -39,10 +40,6 @@ INC += \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) -# For TinyUSB port source -VENDOR = st -CHIP_FAMILY = stm32_fsdev - # For freeRTOS port source FREERTOS_PORT = ARM_CM0 diff --git a/hw/bsp/stm32f103bluepill/board.mk b/hw/bsp/stm32f103bluepill/board.mk index e1cf26e8..1e0b0f53 100644 --- a/hw/bsp/stm32f103bluepill/board.mk +++ b/hw/bsp/stm32f103bluepill/board.mk @@ -21,6 +21,7 @@ CFLAGS += \ LD_FILE = hw/bsp/$(BOARD)/STM32F103XB_FLASH.ld SRC_C += \ + src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c \ $(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \ @@ -37,10 +38,6 @@ INC += \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) -# For TinyUSB port source -VENDOR = st -CHIP_FAMILY = stm32_fsdev - # For freeRTOS port source FREERTOS_PORT = ARM_CM3 diff --git a/hw/bsp/stm32f207nucleo/board.mk b/hw/bsp/stm32f207nucleo/board.mk index 4be6e250..a01f35ad 100644 --- a/hw/bsp/stm32f207nucleo/board.mk +++ b/hw/bsp/stm32f207nucleo/board.mk @@ -21,6 +21,7 @@ CFLAGS += -Wno-error=sign-compare LD_FILE = hw/bsp/$(BOARD)/STM32F207ZGTx_FLASH.ld SRC_C += \ + src/portable/st/synopsys/dcd_synopsys.c \ $(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \ @@ -37,10 +38,6 @@ INC += \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) -# For TinyUSB port source -VENDOR = st -CHIP_FAMILY = synopsys - # For freeRTOS port source FREERTOS_PORT = ARM_CM3 diff --git a/hw/bsp/stm32f303disco/board.mk b/hw/bsp/stm32f303disco/board.mk index 304fa9c5..6cd67da0 100644 --- a/hw/bsp/stm32f303disco/board.mk +++ b/hw/bsp/stm32f303disco/board.mk @@ -22,6 +22,7 @@ CFLAGS += -Wno-error=unused-parameter LD_FILE = hw/bsp/$(BOARD)/STM32F303VCTx_FLASH.ld SRC_C += \ + src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c \ $(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \ @@ -38,10 +39,6 @@ INC += \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) -# For TinyUSB port source -VENDOR = st -CHIP_FAMILY = stm32_fsdev - # For freeRTOS port source FREERTOS_PORT = ARM_CM4F diff --git a/hw/bsp/stm32f4/family.mk b/hw/bsp/stm32f4/family.mk index 1bfb3815..f615efbb 100644 --- a/hw/bsp/stm32f4/family.mk +++ b/hw/bsp/stm32f4/family.mk @@ -21,6 +21,7 @@ CFLAGS += \ CFLAGS += -Wno-error=cast-align SRC_C += \ + src/portable/st/synopsys/dcd_synopsys.c \ $(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \ @@ -35,10 +36,6 @@ INC += \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc -# For TinyUSB port source -VENDOR = st -CHIP_FAMILY = synopsys - # For freeRTOS port source FREERTOS_PORT = ARM_CM4F diff --git a/hw/bsp/stm32f7/family.mk b/hw/bsp/stm32f7/family.mk index ed767085..aca99060 100644 --- a/hw/bsp/stm32f7/family.mk +++ b/hw/bsp/stm32f7/family.mk @@ -34,6 +34,7 @@ endif CFLAGS += -Wno-error=shadow -Wno-error=cast-align SRC_C += \ + src/portable/st/synopsys/dcd_synopsys.c \ $(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \ @@ -49,9 +50,5 @@ INC += \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc -# For TinyUSB port source -VENDOR = st -CHIP_FAMILY = synopsys - # For freeRTOS port source FREERTOS_PORT = ARM_CM7/r0p1 diff --git a/hw/bsp/stm32h7/family.mk b/hw/bsp/stm32h7/family.mk index 8e49604e..2c2b6d79 100644 --- a/hw/bsp/stm32h7/family.mk +++ b/hw/bsp/stm32h7/family.mk @@ -30,6 +30,7 @@ CFLAGS += -Wno-error=maybe-uninitialized -Wno-error=cast-align # All source paths should be relative to the top level. SRC_C += \ + src/portable/st/synopsys/dcd_synopsys.c \ $(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \ @@ -45,10 +46,6 @@ INC += \ $(TOP)/$(ST_CMSIS)/Include \ $(TOP)/$(ST_HAL_DRIVER)/Inc -# For TinyUSB port source -VENDOR = st -CHIP_FAMILY = synopsys - # For freeRTOS port source FREERTOS_PORT = ARM_CM7/r0p1 diff --git a/hw/bsp/stm32l0538disco/board.mk b/hw/bsp/stm32l0538disco/board.mk index 5c1929ae..500674f8 100644 --- a/hw/bsp/stm32l0538disco/board.mk +++ b/hw/bsp/stm32l0538disco/board.mk @@ -22,6 +22,7 @@ CFLAGS += -Wno-error=unused-parameter -Wno-error=maybe-uninitialized LD_FILE = hw/bsp/$(BOARD)/STM32L053C8Tx_FLASH.ld SRC_C += \ + src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c \ $(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \ @@ -38,10 +39,6 @@ INC += \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) -# For TinyUSB port source -VENDOR = st -CHIP_FAMILY = stm32_fsdev - # For freeRTOS port source FREERTOS_PORT = ARM_CM0 diff --git a/hw/bsp/stm32l476disco/board.mk b/hw/bsp/stm32l476disco/board.mk index fefcd643..921fa1ed 100644 --- a/hw/bsp/stm32l476disco/board.mk +++ b/hw/bsp/stm32l476disco/board.mk @@ -22,6 +22,7 @@ CFLAGS += -Wno-error=maybe-uninitialized -Wno-error=cast-align LD_FILE = hw/bsp/$(BOARD)/STM32L476VGTx_FLASH.ld SRC_C += \ + src/portable/st/synopsys/dcd_synopsys.c \ $(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \ @@ -41,10 +42,6 @@ INC += \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) -# For TinyUSB port source -VENDOR = st -CHIP_FAMILY = synopsys - # For freeRTOS port source FREERTOS_PORT = ARM_CM4F diff --git a/hw/bsp/stm32l4r5nucleo/board.mk b/hw/bsp/stm32l4r5nucleo/board.mk index f9fccf9b..f5bdde9a 100644 --- a/hw/bsp/stm32l4r5nucleo/board.mk +++ b/hw/bsp/stm32l4r5nucleo/board.mk @@ -23,6 +23,7 @@ CFLAGS += -Wno-error=maybe-uninitialized -Wno-error=cast-align LD_FILE = hw/bsp/$(BOARD)/STM32L4RXxI_FLASH.ld SRC_C += \ + src/portable/st/synopsys/dcd_synopsys.c \ $(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \ @@ -42,10 +43,6 @@ INC += \ $(TOP)/$(ST_HAL_DRIVER)/Inc \ $(TOP)/hw/bsp/$(BOARD) -# For TinyUSB port source -VENDOR = st -CHIP_FAMILY = synopsys - # For freeRTOS port source FREERTOS_PORT = ARM_CM4F From 2307fc302367e2b3a961be905bcb302394a155ca Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 17 Mar 2021 17:09:25 +0700 Subject: [PATCH 11/72] move esp32s2 and rp2040 target rule to its family.mk --- examples/make.mk | 2 +- examples/rules.mk | 78 ++++++---------------------------------- hw/bsp/esp32s2/family.mk | 36 +++++++++++++++++++ hw/bsp/rp2040/family.mk | 17 +++++++++ 4 files changed, 65 insertions(+), 68 deletions(-) create mode 100644 hw/bsp/esp32s2/family.mk diff --git a/examples/make.mk b/examples/make.mk index 53f633b1..e04a2592 100644 --- a/examples/make.mk +++ b/examples/make.mk @@ -40,7 +40,7 @@ ifeq ($(FAMILY),) include $(TOP)/hw/bsp/$(BOARD)/board.mk else # Include Family and Board specific defs - -include $(TOP)/$(FAMILY_PATH)/family.mk + include $(TOP)/$(FAMILY_PATH)/family.mk SRC_C += $(subst $(TOP)/,,$(wildcard $(TOP)/$(FAMILY_PATH)/*.c)) endif diff --git a/examples/rules.mk b/examples/rules.mk index 7f0927a1..9265bb68 100644 --- a/examples/rules.mk +++ b/examples/rules.mk @@ -5,69 +5,9 @@ # Set all as default goal .DEFAULT_GOAL := all -ifeq ($(FAMILY),esp32s2) -# --------------------------------------- -# Espressif IDF use CMake build system, this add wrapper target to call idf.py -# --------------------------------------- - -.PHONY: all clean flash - -all: - idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) build - -build: all - -clean: - idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) clean - -fullclean: - idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) fullclean - -flash: - idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) flash - -bootloader-flash: - idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) bootloader-flash - -app-flash: - idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) app-flash - -erase: - idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) erase_flash - -monitor: - idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) monitor - -uf2: $(BUILD)/$(PROJECT).uf2 - -UF2_FAMILY_ID = 0xbfdd4eee -$(BUILD)/$(PROJECT).uf2: $(BUILD)/$(PROJECT).bin - @echo CREATE $@ - $(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -f $(UF2_FAMILY_ID) -b 0x0 -c -o $@ $^ - -else ifeq ($(FAMILY),rp2040) -# --------------------------------------- -# RP2040 CMake -# --------------------------------------- - -ifeq ($(DEBUG), 1) -CMAKE_DEFSYM += -DCMAKE_BUILD_TYPE=Debug -endif - -$(BUILD): - cmake -S . -B $(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) -DPICO_BUILD_DOCS=0 $(CMAKE_DEFSYM) - -all: $(BUILD) - $(MAKE) -C $(BUILD) - -clean: - $(RM) -rf $(BUILD) - -#flash: flash-pyocd -flash: - @$(CP) $(BUILD)/$(PROJECT).uf2 /media/$(USER)/RPI-RP2 - -else +# ESP32-S2 and RP2040 has its own CMake build system +ifneq ($(FAMILY),esp32s2) +ifneq ($(FAMILY),rp2040) # --------------------------------------- # GNU Make build system # --------------------------------------- @@ -194,12 +134,12 @@ else $(RM) -rf $(BUILD) endif +endif endif # GNU Make -# Print out the value of a make variable. -# https://stackoverflow.com/questions/16467718/how-to-print-out-a-variable-in-makefile -print-%: - @echo $* = $($*) +# --------------------------------------- +# Flash Targets +# --------------------------------------- # Flash binary using Jlink ifeq ($(OS),Windows_NT) @@ -244,3 +184,7 @@ copy-artifact: $(BIN) #@$(CP) $(BUILD)/$(PROJECT).hex $(BIN) #@$(CP) $(BUILD)/$(PROJECT).elf $(BIN) +# Print out the value of a make variable. +# https://stackoverflow.com/questions/16467718/how-to-print-out-a-variable-in-makefile +print-%: + @echo $* = $($*) diff --git a/hw/bsp/esp32s2/family.mk b/hw/bsp/esp32s2/family.mk new file mode 100644 index 00000000..fd8481fd --- /dev/null +++ b/hw/bsp/esp32s2/family.mk @@ -0,0 +1,36 @@ +#DEPS_SUBMODULES = + +.PHONY: all clean flash + +all: + idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) build + +build: all + +clean: + idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) clean + +fullclean: + idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) fullclean + +flash: + idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) flash + +bootloader-flash: + idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) bootloader-flash + +app-flash: + idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) app-flash + +erase: + idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) erase_flash + +monitor: + idf.py -B$(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) $(CMAKE_DEFSYM) monitor + +uf2: $(BUILD)/$(PROJECT).uf2 + +UF2_FAMILY_ID = 0xbfdd4eee +$(BUILD)/$(PROJECT).uf2: $(BUILD)/$(PROJECT).bin + @echo CREATE $@ + $(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -f $(UF2_FAMILY_ID) -b 0x0 -c -o $@ $^ diff --git a/hw/bsp/rp2040/family.mk b/hw/bsp/rp2040/family.mk index 2778183f..c953840b 100644 --- a/hw/bsp/rp2040/family.mk +++ b/hw/bsp/rp2040/family.mk @@ -1,4 +1,21 @@ DEPS_SUBMODULES = hw/mcu/raspberrypi/pico-sdk +ifeq ($(DEBUG), 1) +CMAKE_DEFSYM += -DCMAKE_BUILD_TYPE=Debug +endif + +$(BUILD): + cmake -S . -B $(BUILD) -DFAMILY=$(FAMILY) -DBOARD=$(BOARD) -DPICO_BUILD_DOCS=0 $(CMAKE_DEFSYM) + +all: $(BUILD) + $(MAKE) -C $(BUILD) + +clean: + $(RM) -rf $(BUILD) + +#flash: flash-pyocd +flash: + @$(CP) $(BUILD)/$(PROJECT).uf2 /media/$(USER)/RPI-RP2 + JLINK_DEVICE = rp2040_m0_0 PYOCD_TARGET = rp2040 From ec08dcf61a86686da101f480565c6fae2acc3359 Mon Sep 17 00:00:00 2001 From: Jeremiah McCarthy Date: Wed, 17 Mar 2021 09:25:01 -0400 Subject: [PATCH 12/72] Implement requested changes for PR724 --- src/class/usbtmc/usbtmc_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class/usbtmc/usbtmc_device.c b/src/class/usbtmc/usbtmc_device.c index 6c9b4244..d5f8fe41 100644 --- a/src/class/usbtmc/usbtmc_device.c +++ b/src/class/usbtmc/usbtmc_device.c @@ -145,7 +145,7 @@ typedef struct usbtmc_capabilities_specific_t const * capabilities; } usbtmc_interface_state_t; -static usbtmc_interface_state_t usbtmc_state = +CFG_TUSB_MEM_SECTION static usbtmc_interface_state_t usbtmc_state = { .itf_id = 0xFF, }; From e7e03db9f863b1425c9ad60571a59986e40835bd Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 17 Mar 2021 20:27:32 +0700 Subject: [PATCH 13/72] update issue template --- .github/ISSUE_TEMPLATE/bug_report.md | 19 ++++++++++--------- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 9f956f9d..1e1ffb7c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,5 +1,5 @@ --- -name: Bug report +name: Bug Report about: Create a report to help us improve title: '' labels: Bug 🐞 @@ -7,16 +7,17 @@ assignees: '' --- -**Set up** -[Mandatory] Provide details of your setup help us to reproduce the issue as quick as possible - - **PC OS** : Ubuntu 18.04 / Windows 10/ macOS 10.15 - - **Board** : Feather nRF52840 Express - - **Firmware**: examples/device/cdc_msc +Please provide details for all required fields, otherwise issue could be CLOSED and/or LOCKED. -**Describe the bug** +**Set Up (required)** +- **PC OS** e.g Ubuntu 20.04 / Windows 10/ macOS 10.15 +- **Board** e.g Feather nRF52840 Express (if custom specify your MCUs) +- **Firmware** e.g examples/device/cdc_msc + +**Describe The Bug (required)** A clear and concise description of what the bug is. -**To reproduce** +**To Reproduce (required)** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' @@ -26,4 +27,4 @@ Steps to reproduce the behavior: If applicable, add screenshots, bus capture to help explain your problem. **Log** -Please provide the stack's log (uart/rtt/swo) where the issue occurred, best with comments to explain the actual events. To enable logging, add `LOG=2` to to the make command if building with stock examples or set `CFG_TUSB_DEBUG=2` in your tusb_config.h. More information can be found at [example's readme](/docs/getting_started.md) +If applicable, provide the stack's log (uart/rtt/swo) where the issue occurred, best with comments to explain the actual events. To enable logging, add `LOG=2` to to the make command if building with stock examples or set `CFG_TUSB_DEBUG=2` in your tusb_config.h. More information can be found at [example's readme](/docs/getting_started.md) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 9842a229..562d3113 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,5 +1,5 @@ --- -name: Feature request +name: Feature Request about: Suggest an idea for this project title: '' labels: Feature 💡 From b221cedf80fadc4e810cca9408d91b12cf583e7e Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 17 Mar 2021 21:36:52 +0700 Subject: [PATCH 14/72] spaces --- hw/bsp/nrf/family.mk | 2 +- hw/bsp/nutiny_nuc121s/board.mk | 2 +- hw/bsp/same54xplainedpro/board.mk | 2 +- hw/bsp/stm32f4/family.mk | 2 +- hw/bsp/stm32f7/family.mk | 2 +- hw/bsp/stm32h7/family.mk | 2 +- hw/bsp/stm32l476disco/board.mk | 2 +- hw/bsp/stm32l4r5nucleo/board.mk | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/bsp/nrf/family.mk b/hw/bsp/nrf/family.mk index 8f55fd71..90144f96 100644 --- a/hw/bsp/nrf/family.mk +++ b/hw/bsp/nrf/family.mk @@ -34,7 +34,7 @@ LD_FILE ?= hw/bsp/nrf/boards/$(BOARD)/nrf52840_s140_v6.ld LDFLAGS += -L$(TOP)/hw/mcu/nordic/nrfx/mdk SRC_C += \ - src/portable/nordic/nrf5x/dcd_nrf5x.c \ + src/portable/nordic/nrf5x/dcd_nrf5x.c \ hw/mcu/nordic/nrfx/drivers/src/nrfx_power.c \ hw/mcu/nordic/nrfx/drivers/src/nrfx_uarte.c \ hw/mcu/nordic/nrfx/mdk/system_$(MCU_VARIANT).c diff --git a/hw/bsp/nutiny_nuc121s/board.mk b/hw/bsp/nutiny_nuc121s/board.mk index d94af609..c3fb1be9 100644 --- a/hw/bsp/nutiny_nuc121s/board.mk +++ b/hw/bsp/nutiny_nuc121s/board.mk @@ -14,7 +14,7 @@ CFLAGS += \ LD_FILE = hw/bsp/$(BOARD)/nuc121_flash.ld SRC_C += \ - src/portable/nuvoton/nuc121/dcd_nuc121.c \ + src/portable/nuvoton/nuc121/dcd_nuc121.c \ hw/mcu/nuvoton/nuc121_125/Device/Nuvoton/NUC121/Source/system_NUC121.c \ hw/mcu/nuvoton/nuc121_125/StdDriver/src/adc.c \ hw/mcu/nuvoton/nuc121_125/StdDriver/src/bpwm.c \ diff --git a/hw/bsp/same54xplainedpro/board.mk b/hw/bsp/same54xplainedpro/board.mk index 2ad4ada0..f43a5fde 100644 --- a/hw/bsp/same54xplainedpro/board.mk +++ b/hw/bsp/same54xplainedpro/board.mk @@ -20,7 +20,7 @@ CFLAGS += \ LD_FILE = hw/bsp/$(BOARD)/same54p20a_flash.ld SRC_C += \ - src/portable/microchip/samd/dcd_samd.c \ + src/portable/microchip/samd/dcd_samd.c \ hw/mcu/microchip/same54/gcc/gcc/startup_same54.c \ hw/mcu/microchip/same54/gcc/system_same54.c \ hw/mcu/microchip/same54/hal/utils/src/utils_syscalls.c diff --git a/hw/bsp/stm32f4/family.mk b/hw/bsp/stm32f4/family.mk index f615efbb..bf0bfadf 100644 --- a/hw/bsp/stm32f4/family.mk +++ b/hw/bsp/stm32f4/family.mk @@ -21,7 +21,7 @@ CFLAGS += \ CFLAGS += -Wno-error=cast-align SRC_C += \ - src/portable/st/synopsys/dcd_synopsys.c \ + src/portable/st/synopsys/dcd_synopsys.c \ $(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \ diff --git a/hw/bsp/stm32f7/family.mk b/hw/bsp/stm32f7/family.mk index aca99060..be0bd2a6 100644 --- a/hw/bsp/stm32f7/family.mk +++ b/hw/bsp/stm32f7/family.mk @@ -34,7 +34,7 @@ endif CFLAGS += -Wno-error=shadow -Wno-error=cast-align SRC_C += \ - src/portable/st/synopsys/dcd_synopsys.c \ + src/portable/st/synopsys/dcd_synopsys.c \ $(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \ diff --git a/hw/bsp/stm32h7/family.mk b/hw/bsp/stm32h7/family.mk index 2c2b6d79..da21ef6f 100644 --- a/hw/bsp/stm32h7/family.mk +++ b/hw/bsp/stm32h7/family.mk @@ -30,7 +30,7 @@ CFLAGS += -Wno-error=maybe-uninitialized -Wno-error=cast-align # All source paths should be relative to the top level. SRC_C += \ - src/portable/st/synopsys/dcd_synopsys.c \ + src/portable/st/synopsys/dcd_synopsys.c \ $(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \ diff --git a/hw/bsp/stm32l476disco/board.mk b/hw/bsp/stm32l476disco/board.mk index 921fa1ed..414e3d4f 100644 --- a/hw/bsp/stm32l476disco/board.mk +++ b/hw/bsp/stm32l476disco/board.mk @@ -22,7 +22,7 @@ CFLAGS += -Wno-error=maybe-uninitialized -Wno-error=cast-align LD_FILE = hw/bsp/$(BOARD)/STM32L476VGTx_FLASH.ld SRC_C += \ - src/portable/st/synopsys/dcd_synopsys.c \ + src/portable/st/synopsys/dcd_synopsys.c \ $(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \ diff --git a/hw/bsp/stm32l4r5nucleo/board.mk b/hw/bsp/stm32l4r5nucleo/board.mk index f5bdde9a..d6808182 100644 --- a/hw/bsp/stm32l4r5nucleo/board.mk +++ b/hw/bsp/stm32l4r5nucleo/board.mk @@ -23,7 +23,7 @@ CFLAGS += -Wno-error=maybe-uninitialized -Wno-error=cast-align LD_FILE = hw/bsp/$(BOARD)/STM32L4RXxI_FLASH.ld SRC_C += \ - src/portable/st/synopsys/dcd_synopsys.c \ + src/portable/st/synopsys/dcd_synopsys.c \ $(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \ $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \ From 161b8587bd435ae2dc6f0aafac41019a09580b80 Mon Sep 17 00:00:00 2001 From: Jeremiah McCarthy Date: Wed, 17 Mar 2021 14:24:14 -0400 Subject: [PATCH 15/72] Revert "Add Linux support to tmc example" This reverts commit dc2f00cca157dc2279f917f59f9607fcd17b3fdb. --- examples/device/usbtmc/visaQuery.py | 38 ++++++++++++----------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/examples/device/usbtmc/visaQuery.py b/examples/device/usbtmc/visaQuery.py index 3f46b98e..b5bf8d48 100644 --- a/examples/device/usbtmc/visaQuery.py +++ b/examples/device/usbtmc/visaQuery.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -import pyvisa as visa +import visa import time import sys @@ -36,8 +36,8 @@ def test_trig(): time.sleep(0.3) # SRQ may have some delay assert (inst.read_stb() & 0x40), "SRQ not set after 0.3 seconds" assert (inst.read_stb() == 0) - - + + def test_mav(): inst.write("delay 50") inst.read_stb() # clear STB @@ -45,15 +45,15 @@ def test_mav(): inst.write("123") time.sleep(0.3) assert (inst.read_stb() & 0x10), "MAV not set after 0.5 seconds" - + rsp = inst.read() assert(rsp == "123\r\n") - - + + def test_srq(): assert (inst.read_stb() == 0) inst.write("123") - + #inst.enable_event(visa.constants.VI_EVENT_SERVICE_REQ, visa.constants.VI_QUEUE) #waitrsp = inst.wait_on_event(visa.constants.VI_EVENT_SERVICE_REQ, 5000) #inst.discard_events(visa.constants.VI_EVENT_SERVICE_REQ, visa.constants.VI_QUEUE) @@ -64,7 +64,7 @@ def test_srq(): assert (stb == 0x50),msg assert (inst.read_stb() == 0x10), "SRQ set at second read!" - + rsp = inst.read() assert(rsp == "123\r\n") @@ -110,14 +110,14 @@ def test_abort_in(): inst.timeout = 800 y = inst.read() assert(y == "xxx\r\n") - + def test_indicate(): # perform indicator pulse usb_iface = inst.get_visa_attribute(visa.constants.VI_ATTR_USB_INTFC_NUM) retv = inst.control_in(request_type_bitmap_field=0xA1, request_id=64, request_value=0x0000, index=usb_iface, length=0x0001) assert((retv[1] == visa.constants.StatusCode(0)) and (retv[0] == b'\x01')), f"indicator pulse failed: retv={retv}" - - + + def test_multi_read(): old_chunk_size = inst.chunk_size longstr = "0123456789abcdefghijklmnopqrstuvwxyz" * 10 @@ -129,7 +129,7 @@ def test_multi_read(): y = inst.read() assert (x + "\r\n" == y) #inst.chunk_size = old_chunk_size - + def test_stall_ep0(): usb_iface = inst.get_visa_attribute(visa.constants.VI_ATTR_USB_INTFC_NUM) inst.read_stb() @@ -139,25 +139,17 @@ def test_stall_ep0(): assert false except visa.VisaIOError: pass - + assert (inst.read_stb() == 0) -os = sys.platform -if os == "linux" or os == "linux2": - rm = visa.ResourceManager("@py") -elif os == "darwin": - ## Not tested - print("Mac not tested\n"); - sys.exit() -elif os == "win32": - rm = visa.ResourceManager("/c/Windows/system32/visa64.dll") +rm = visa.ResourceManager("/c/Windows/system32/visa64.dll") reslist = rm.list_resources("USB?::?*::INSTR") print(reslist) if (len(reslist) == 0): sys.exit() - + inst = rm.open_resource(reslist[0]); inst.timeout = 3000 From 64f41dea62ee48452c4b353cb34ddbd57a8fffad Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 18 Mar 2021 15:07:07 +0700 Subject: [PATCH 16/72] fix race condition that could cause drop packet of Bulk OUT transfer NRF_USBD->SIZE.EPOUT[epnum] only need to write once to enable Bulk/Interrupt transfer. We only need to do it in dcd_edpt_open() and dcd_edpt_clear_stall() --- src/portable/nordic/nrf5x/dcd_nrf5x.c | 131 +++++++++++++------------- 1 file changed, 66 insertions(+), 65 deletions(-) diff --git a/src/portable/nordic/nrf5x/dcd_nrf5x.c b/src/portable/nordic/nrf5x/dcd_nrf5x.c index d9fe2b6a..6b8095a0 100644 --- a/src/portable/nordic/nrf5x/dcd_nrf5x.c +++ b/src/portable/nordic/nrf5x/dcd_nrf5x.c @@ -53,13 +53,11 @@ enum enum { - // Endpoint number is fixed (8) for ISOOUT and ISOIN. - EP_ISO_NUM = 8, - // CBI endpoints count - EP_COUNT = 8 + EP_ISO_NUM = 8, // Endpoint number is fixed (8) for ISOOUT and ISOIN + EP_CBI_COUNT = 8 // Control Bulk Interrupt endpoints count }; -// Transfer descriptor +// Transfer Descriptor typedef struct { uint8_t* buffer; @@ -67,9 +65,10 @@ typedef struct volatile uint16_t actual_len; uint16_t mps; // max packet size - // nrf52840 will auto ACK OUT packet after DMA is done + // nRF will auto accept OUT packet after DMA is done // indicate packet is already ACK volatile bool data_received; + // Set to true when data was transferred from RAM to ISO IN output buffer. // New data can be put in ISO IN output buffer after SOF. bool iso_in_transfer_ready; @@ -81,7 +80,7 @@ static struct { // All 8 endpoints including control IN & OUT (offset 1) // +1 for ISO endpoints - xfer_td_t xfer[EP_COUNT + 1][2]; + xfer_td_t xfer[EP_CBI_COUNT + 1][2]; // Number of pending DMA that is started but not handled yet by dcd_int_handler(). // Since nRF can only carry one DMA can run at a time, this value is normally be either 0 or 1. @@ -133,7 +132,7 @@ static void edpt_dma_start(volatile uint32_t* reg_startep) { ended = NRF_USBD->EVENTS_ENDISOIN + NRF_USBD->EVENTS_ENDISOOUT; - for (uint8_t i=0; iEVENTS_ENDEPIN[i] + NRF_USBD->EVENTS_ENDEPOUT[i]; } @@ -166,27 +165,6 @@ static inline xfer_td_t* get_td(uint8_t epnum, uint8_t dir) return &_dcd.xfer[epnum][dir]; } -/*------------- CBI OUT Transfer -------------*/ - -// Prepare for a CBI transaction OUT, call at the start -// Allow ACK incoming data -static void xact_out_prepare(uint8_t epnum) -{ - if ( epnum == 0 ) - { - NRF_USBD->TASKS_EP0RCVOUT = 1; - } - else - { - // Write zero value to SIZE register will allow hw to ACK (accept data) - // If it is not already done by DMA - // SIZE.ISOOUT can also be accessed this way - NRF_USBD->SIZE.EPOUT[epnum] = 0; - } - - __ISB(); __DSB(); -} - // Start DMA to move data from Endpoint -> RAM static void xact_out_dma(uint8_t epnum) { @@ -217,15 +195,14 @@ static void xact_out_dma(uint8_t epnum) edpt_dma_start(&NRF_USBD->TASKS_STARTEPOUT[epnum]); } + xfer->buffer += xact_len; xfer->actual_len += xact_len; } -/*------------- CBI IN Transfer -------------*/ - // Prepare for a CBI transaction IN, call at the start // it start DMA to transfer data from RAM -> Endpoint -static void xact_in_prepare(uint8_t epnum) +static void xact_in_dma(uint8_t epnum) { xfer_td_t* xfer = get_td(epnum, TUSB_DIR_IN); @@ -327,6 +304,9 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt) { NRF_USBD->INTENSET = TU_BIT(USBD_INTEN_ENDEPOUT0_Pos + epnum); NRF_USBD->EPOUTEN |= TU_BIT(epnum); + + // Write any value to SIZE register will allow nRF to ACK/accept data + NRF_USBD->SIZE.EPOUT[epnum] = 0; }else { NRF_USBD->INTENSET = TU_BIT(USBD_INTEN_ENDEPIN0_Pos + epnum); @@ -438,20 +418,31 @@ bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t } else if ( dir == TUSB_DIR_OUT ) { - if ( xfer->data_received ) + if ( epnum == 0 ) { - // nrf52840 auto ACK OUT packet after DMA is done - // Data already received previously --> trigger DMA to copy to SRAM - xact_out_dma(epnum); - } - else + // Accept next Control Out packet + NRF_USBD->TASKS_EP0RCVOUT = 1; + }else { - xact_out_prepare(epnum); + if ( xfer->data_received ) + { + // Data may already be received previously + xfer->data_received = false; + + // start DMA to copy to SRAM + xact_out_dma(epnum); + } + else + { + // nRF auto accept next Bulk/Interrupt OUT packet + // nothing to do + } } } else { - xact_in_prepare(epnum); + // Start DMA to copy data from RAM -> Endpoint + xact_in_dma(epnum); } return true; @@ -477,6 +468,7 @@ void dcd_edpt_clear_stall (uint8_t rhport, uint8_t ep_addr) { (void) rhport; uint8_t const epnum = tu_edpt_number(ep_addr); + uint8_t const dir = tu_edpt_dir(ep_addr); if ( epnum != 0 && epnum != EP_ISO_NUM ) { @@ -486,6 +478,10 @@ void dcd_edpt_clear_stall (uint8_t rhport, uint8_t ep_addr) // reset data toggle to DATA0 NRF_USBD->DTOGGLE = (USBD_DTOGGLE_VALUE_Data0 << USBD_DTOGGLE_VALUE_Pos) | ep_addr; + // Write any value to SIZE register will allow nRF to ACK/accept data + // Drop any pending data + if (dir == TUSB_DIR_OUT) NRF_USBD->SIZE.EPOUT[epnum] = 0; + __ISB(); __DSB(); } } @@ -594,17 +590,18 @@ void dcd_int_handler(uint8_t rhport) // Setup tokens are specific to the Control endpoint. if ( int_status & USBD_INTEN_EP0SETUP_Msk ) { - uint8_t const setup[8] = { - NRF_USBD->BMREQUESTTYPE , NRF_USBD->BREQUEST, NRF_USBD->WVALUEL , NRF_USBD->WVALUEH, - NRF_USBD->WINDEXL , NRF_USBD->WINDEXH , NRF_USBD->WLENGTHL, NRF_USBD->WLENGTHH + uint8_t const setup[8] = + { + NRF_USBD->BMREQUESTTYPE , NRF_USBD->BREQUEST, NRF_USBD->WVALUEL , NRF_USBD->WVALUEH, + NRF_USBD->WINDEXL , NRF_USBD->WINDEXH , NRF_USBD->WLENGTHL, NRF_USBD->WLENGTHH }; // nrf5x hw auto handle set address, there is no need to inform usb stack tusb_control_request_t const * request = (tusb_control_request_t const *) setup; - if ( !(TUSB_REQ_RCPT_DEVICE == request->bmRequestType_bit.recipient && + if ( !(TUSB_REQ_RCPT_DEVICE == request->bmRequestType_bit.recipient && TUSB_REQ_TYPE_STANDARD == request->bmRequestType_bit.type && - TUSB_REQ_SET_ADDRESS == request->bRequest) ) + TUSB_REQ_SET_ADDRESS == request->bRequest) ) { dcd_event_setup_received(0, setup, true); } @@ -620,15 +617,15 @@ void dcd_int_handler(uint8_t rhport) * For CBI OUT: * - Host -> Endpoint * EPDATA (or EP0DATADONE) interrupted, check EPDATASTATUS.EPOUT[i] - * to start DMA. This step can occur automatically (without sw), - * which means data may or may not ready (data_received flag). + * to start DMA. For Bulk/Interrupt, this step can occur automatically (without sw), + * which means data may or may not be ready (data_received flag). * - Endpoint -> RAM * ENDEPOUT[i] interrupted, transaction complete, sw prepare next transaction * * For CBI IN: * - RAM -> Endpoint * ENDEPIN[i] interrupted indicate DMA is complete. HW will start - * to move daat to host + * to move data to host * - Endpoint -> Host * EPDATA (or EP0DATADONE) interrupted, check EPDATASTATUS.EPIN[i]. * Transaction is complete, sw prepare next transaction @@ -640,27 +637,31 @@ void dcd_int_handler(uint8_t rhport) /* CBI OUT: Endpoint -> SRAM (aka transaction complete) * Note: Since nRF controller auto ACK next packet without SW awareness - * We must handle this stage before Host -> Endpoint just in case - * 2 event happens at once - * ISO OUT: Transaction must fit in single packed, it can be shorter then total + * We must handle this stage before Host -> Endpoint just in case 2 event happens at once + * + * ISO OUT: Transaction must fit in single packet, it can be shorter then total * len if Host decides to sent fewer bytes, it this case transaction is also * complete and next transfer is not initiated here like for CBI. */ - for(uint8_t epnum=0; epnumEPOUT[epnum].AMOUNT; - // Data in endpoint has been consumed - xfer->data_received = false; - // Transfer complete if transaction len < Max Packet Size or total len is transferred if ( (epnum != EP_ISO_NUM) && (xact_len == xfer->mps) && (xfer->actual_len < xfer->total_len) ) { - // Prepare for next transaction - xact_out_prepare(epnum); + if ( epnum == 0 ) + { + // Accept next Control Out packet + NRF_USBD->TASKS_EP0RCVOUT = 1; + }else + { + // nRF auto accept next Bulk/Interrupt OUT packet + // nothing to do + } }else { xfer->total_len = xfer->actual_len; @@ -673,7 +674,7 @@ void dcd_int_handler(uint8_t rhport) // Ended event for CBI IN : nothing to do } - // Endpoint <-> Host + // Endpoint <-> Host ( In & OUT ) if ( int_status & (USBD_INTEN_EPDATA_Msk | USBD_INTEN_EP0DATADONE_Msk) ) { uint32_t data_status = NRF_USBD->EPDATASTATUS; @@ -687,9 +688,9 @@ void dcd_int_handler(uint8_t rhport) bool const is_control_out = (int_status & USBD_INTEN_EP0DATADONE_Msk) && !(NRF_USBD->BMREQUESTTYPE & TUSB_DIR_IN_MASK); // CBI In: Endpoint -> Host (transaction complete) - for(uint8_t epnum=0; epnum<8; epnum++) + for(uint8_t epnum=0; epnumactual_len < xfer->total_len ) { - // prepare next transaction - xact_in_prepare(epnum); + // Start DMA to copy next data packet + xact_in_dma(epnum); } else { // CBI IN complete @@ -708,9 +709,9 @@ void dcd_int_handler(uint8_t rhport) } // CBI OUT: Host -> Endpoint - for(uint8_t epnum=0; epnum<8; epnum++) + for(uint8_t epnum=0; epnumdata_received = true; } From 2882390c82fc08a669093419abc69f25bc11a34f Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 18 Mar 2021 15:23:08 +0700 Subject: [PATCH 17/72] clean up some examples --- examples/device/cdc_dual_ports/src/main.c | 6 ++-- .../device/cdc_dual_ports/src/tusb_config.h | 2 ++ examples/device/cdc_msc/src/main.c | 28 +++++++++---------- examples/device/cdc_msc/src/tusb_config.h | 3 ++ examples/device/cdc_msc_freertos/src/main.c | 22 +++++++-------- .../device/cdc_msc_freertos/src/tusb_config.h | 3 ++ 6 files changed, 34 insertions(+), 30 deletions(-) diff --git a/examples/device/cdc_dual_ports/src/main.c b/examples/device/cdc_dual_ports/src/main.c index 198c4252..34cd29ed 100644 --- a/examples/device/cdc_dual_ports/src/main.c +++ b/examples/device/cdc_dual_ports/src/main.c @@ -63,13 +63,11 @@ static void echo_serial_port(uint8_t itf, uint8_t buf[], uint32_t count) } else { - // echo back additional ports as upper case + // echo back 2nd port as upper case if (islower(buf[i])) buf[i] -= 'a' - 'A'; } tud_cdc_n_write_char(itf, buf[i]); - - if ( buf[i] == '\r' ) tud_cdc_n_write_char(itf, '\n'); } tud_cdc_n_write_flush(itf); } @@ -85,7 +83,7 @@ static void cdc_task(void) { // connected() check for DTR bit // Most but not all terminal client set this when making connection - if ( tud_cdc_n_connected(itf) ) + // if ( tud_cdc_n_connected(itf) ) { if ( tud_cdc_n_available(itf) ) { diff --git a/examples/device/cdc_dual_ports/src/tusb_config.h b/examples/device/cdc_dual_ports/src/tusb_config.h index 69001bde..7db520dd 100644 --- a/examples/device/cdc_dual_ports/src/tusb_config.h +++ b/examples/device/cdc_dual_ports/src/tusb_config.h @@ -104,6 +104,8 @@ #define CFG_TUD_CDC_RX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64) #define CFG_TUD_CDC_TX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64) +// CDC Endpoint transfer buffer size, more is faster +#define CFG_TUD_CDC_EP_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64) #ifdef __cplusplus } diff --git a/examples/device/cdc_msc/src/main.c b/examples/device/cdc_msc/src/main.c index a20a80fc..131ae654 100644 --- a/examples/device/cdc_msc/src/main.c +++ b/examples/device/cdc_msc/src/main.c @@ -48,7 +48,6 @@ enum { static uint32_t blink_interval_ms = BLINK_NOT_MOUNTED; void led_blinking_task(void); - void cdc_task(void); /*------------- MAIN -------------*/ @@ -112,18 +111,16 @@ void cdc_task(void) // connected and there are data available if ( tud_cdc_available() ) { - uint8_t buf[64]; - - // read and echo back + // read datas + char buf[64]; uint32_t count = tud_cdc_read(buf, sizeof(buf)); + (void) count; - for(uint32_t i=0; i Date: Thu, 18 Mar 2021 16:28:44 +0700 Subject: [PATCH 18/72] add example specific DEPS_SUBMODULES --- examples/device/cdc_msc_freertos/Makefile | 2 ++ examples/device/hid_composite_freertos/Makefile | 2 ++ examples/device/net_lwip_webserver/Makefile | 2 ++ hw/bsp/d5035_01/board.mk | 2 +- hw/bsp/ea4088qs/board.mk | 2 +- hw/bsp/ea4357/board.mk | 2 +- hw/bsp/esp32s2/family.mk | 2 +- hw/bsp/frdm_kl25z/board.mk | 2 +- hw/bsp/imxrt/family.mk | 2 +- hw/bsp/lpc18/family.mk | 2 +- hw/bsp/lpc55/family.mk | 2 +- hw/bsp/lpcxpresso11u37/board.mk | 2 +- hw/bsp/lpcxpresso11u68/board.mk | 2 +- hw/bsp/lpcxpresso1347/board.mk | 2 +- hw/bsp/lpcxpresso1549/board.mk | 2 +- hw/bsp/lpcxpresso1769/board.mk | 2 +- hw/bsp/lpcxpresso51u68/board.mk | 2 +- hw/bsp/lpcxpresso54114/board.mk | 2 +- hw/bsp/mbed1768/board.mk | 2 +- hw/bsp/msp430/family.mk | 2 +- hw/bsp/ngx4330/board.mk | 2 +- hw/bsp/nrf/family.mk | 2 +- hw/bsp/nutiny_nuc121s/board.mk | 2 +- hw/bsp/nutiny_nuc125s/board.mk | 2 +- hw/bsp/nutiny_nuc126v/board.mk | 2 +- hw/bsp/nutiny_sdk_nuc120/board.mk | 2 +- hw/bsp/nutiny_sdk_nuc505/board.mk | 2 +- hw/bsp/rp2040/family.mk | 2 +- hw/bsp/samd11/family.mk | 2 +- hw/bsp/samd21/family.mk | 2 +- hw/bsp/samd51/family.mk | 2 +- hw/bsp/same54xplainedpro/board.mk | 2 +- hw/bsp/same70_xplained/board.mk | 2 +- hw/bsp/samg55xplained/board.mk | 2 +- hw/bsp/spresense/board.mk | 2 +- hw/bsp/stm32f070rbnucleo/board.mk | 2 +- hw/bsp/stm32f072disco/board.mk | 2 +- hw/bsp/stm32f103bluepill/board.mk | 2 +- hw/bsp/stm32f207nucleo/board.mk | 2 +- hw/bsp/stm32f303disco/board.mk | 2 +- hw/bsp/stm32f4/family.mk | 2 +- hw/bsp/stm32f7/family.mk | 2 +- hw/bsp/stm32h7/family.mk | 2 +- hw/bsp/stm32l0538disco/board.mk | 2 +- hw/bsp/stm32l476disco/board.mk | 2 +- hw/bsp/stm32l4r5nucleo/board.mk | 2 +- 46 files changed, 49 insertions(+), 43 deletions(-) diff --git a/examples/device/cdc_msc_freertos/Makefile b/examples/device/cdc_msc_freertos/Makefile index 36174b5e..86bacd2d 100644 --- a/examples/device/cdc_msc_freertos/Makefile +++ b/examples/device/cdc_msc_freertos/Makefile @@ -1,3 +1,5 @@ +DEPS_SUBMODULES += lib/FreeRTOS-Kernel + include ../../../tools/top.mk include ../../make.mk diff --git a/examples/device/hid_composite_freertos/Makefile b/examples/device/hid_composite_freertos/Makefile index db7dfd34..1c195959 100644 --- a/examples/device/hid_composite_freertos/Makefile +++ b/examples/device/hid_composite_freertos/Makefile @@ -1,3 +1,5 @@ +DEPS_SUBMODULES += lib/FreeRTOS-Kernel + include ../../../tools/top.mk include ../../make.mk diff --git a/examples/device/net_lwip_webserver/Makefile b/examples/device/net_lwip_webserver/Makefile index fa93cf87..c3e0d889 100644 --- a/examples/device/net_lwip_webserver/Makefile +++ b/examples/device/net_lwip_webserver/Makefile @@ -1,3 +1,5 @@ +DEPS_SUBMODULES += lib/lwip + include ../../../tools/top.mk include ../../make.mk diff --git a/hw/bsp/d5035_01/board.mk b/hw/bsp/d5035_01/board.mk index b7556f0a..1d09bd3d 100644 --- a/hw/bsp/d5035_01/board.mk +++ b/hw/bsp/d5035_01/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/microchip +DEPS_SUBMODULES += hw/mcu/microchip HWREV ?= 1 CFLAGS += \ diff --git a/hw/bsp/ea4088qs/board.mk b/hw/bsp/ea4088qs/board.mk index ff8bfd40..05e730d2 100644 --- a/hw/bsp/ea4088qs/board.mk +++ b/hw/bsp/ea4088qs/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/nxp +DEPS_SUBMODULES += hw/mcu/nxp CFLAGS += \ -flto \ diff --git a/hw/bsp/ea4357/board.mk b/hw/bsp/ea4357/board.mk index a553938c..1ad97057 100644 --- a/hw/bsp/ea4357/board.mk +++ b/hw/bsp/ea4357/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/nxp +DEPS_SUBMODULES += hw/mcu/nxp CFLAGS += \ -flto \ diff --git a/hw/bsp/esp32s2/family.mk b/hw/bsp/esp32s2/family.mk index fd8481fd..8bd290eb 100644 --- a/hw/bsp/esp32s2/family.mk +++ b/hw/bsp/esp32s2/family.mk @@ -1,4 +1,4 @@ -#DEPS_SUBMODULES = +#DEPS_SUBMODULES += .PHONY: all clean flash diff --git a/hw/bsp/frdm_kl25z/board.mk b/hw/bsp/frdm_kl25z/board.mk index f63b181a..1a4d718c 100644 --- a/hw/bsp/frdm_kl25z/board.mk +++ b/hw/bsp/frdm_kl25z/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/nxp +DEPS_SUBMODULES += hw/mcu/nxp CFLAGS += \ -mthumb \ diff --git a/hw/bsp/imxrt/family.mk b/hw/bsp/imxrt/family.mk index 3aeac8e5..1b6d7e8d 100644 --- a/hw/bsp/imxrt/family.mk +++ b/hw/bsp/imxrt/family.mk @@ -1,5 +1,5 @@ UF2_FAMILY_ID = 0x4fb2d5bd -DEPS_SUBMODULES = hw/mcu/nxp +DEPS_SUBMODULES += hw/mcu/nxp include $(TOP)/$(BOARD_PATH)/board.mk diff --git a/hw/bsp/lpc18/family.mk b/hw/bsp/lpc18/family.mk index f016f1a3..0908e187 100644 --- a/hw/bsp/lpc18/family.mk +++ b/hw/bsp/lpc18/family.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/nxp +DEPS_SUBMODULES += hw/mcu/nxp include $(TOP)/$(BOARD_PATH)/board.mk diff --git a/hw/bsp/lpc55/family.mk b/hw/bsp/lpc55/family.mk index 557e3391..c8874f57 100644 --- a/hw/bsp/lpc55/family.mk +++ b/hw/bsp/lpc55/family.mk @@ -1,5 +1,5 @@ UF2_FAMILY_ID = 0x2abc77ec -DEPS_SUBMODULES = lib/sct_neopixel hw/mcu/nxp +DEPS_SUBMODULES += lib/sct_neopixel hw/mcu/nxp include $(TOP)/$(BOARD_PATH)/board.mk diff --git a/hw/bsp/lpcxpresso11u37/board.mk b/hw/bsp/lpcxpresso11u37/board.mk index 1f4a4749..7fa42f9a 100644 --- a/hw/bsp/lpcxpresso11u37/board.mk +++ b/hw/bsp/lpcxpresso11u37/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/nxp +DEPS_SUBMODULES += hw/mcu/nxp CFLAGS += \ -flto \ diff --git a/hw/bsp/lpcxpresso11u68/board.mk b/hw/bsp/lpcxpresso11u68/board.mk index d750a7be..b59506d4 100644 --- a/hw/bsp/lpcxpresso11u68/board.mk +++ b/hw/bsp/lpcxpresso11u68/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/nxp +DEPS_SUBMODULES += hw/mcu/nxp CFLAGS += \ -flto \ diff --git a/hw/bsp/lpcxpresso1347/board.mk b/hw/bsp/lpcxpresso1347/board.mk index 93e1c953..0f63cefb 100644 --- a/hw/bsp/lpcxpresso1347/board.mk +++ b/hw/bsp/lpcxpresso1347/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/nxp +DEPS_SUBMODULES += hw/mcu/nxp CFLAGS += \ -flto \ diff --git a/hw/bsp/lpcxpresso1549/board.mk b/hw/bsp/lpcxpresso1549/board.mk index 7daa2ab7..f4d109ec 100644 --- a/hw/bsp/lpcxpresso1549/board.mk +++ b/hw/bsp/lpcxpresso1549/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/nxp +DEPS_SUBMODULES += hw/mcu/nxp CFLAGS += \ -flto \ diff --git a/hw/bsp/lpcxpresso1769/board.mk b/hw/bsp/lpcxpresso1769/board.mk index e67ba16f..678c703d 100644 --- a/hw/bsp/lpcxpresso1769/board.mk +++ b/hw/bsp/lpcxpresso1769/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/nxp +DEPS_SUBMODULES += hw/mcu/nxp CFLAGS += \ -flto \ diff --git a/hw/bsp/lpcxpresso51u68/board.mk b/hw/bsp/lpcxpresso51u68/board.mk index dedc0cc4..2582e98f 100644 --- a/hw/bsp/lpcxpresso51u68/board.mk +++ b/hw/bsp/lpcxpresso51u68/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/nxp +DEPS_SUBMODULES += hw/mcu/nxp CFLAGS += \ -flto \ diff --git a/hw/bsp/lpcxpresso54114/board.mk b/hw/bsp/lpcxpresso54114/board.mk index eea6f0c5..b6bc0761 100644 --- a/hw/bsp/lpcxpresso54114/board.mk +++ b/hw/bsp/lpcxpresso54114/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/nxp +DEPS_SUBMODULES += hw/mcu/nxp CFLAGS += \ -flto \ diff --git a/hw/bsp/mbed1768/board.mk b/hw/bsp/mbed1768/board.mk index eb6c8647..bd48b29b 100644 --- a/hw/bsp/mbed1768/board.mk +++ b/hw/bsp/mbed1768/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/nxp +DEPS_SUBMODULES += hw/mcu/nxp CFLAGS += \ -flto \ diff --git a/hw/bsp/msp430/family.mk b/hw/bsp/msp430/family.mk index 913f48cf..ceafa6ec 100644 --- a/hw/bsp/msp430/family.mk +++ b/hw/bsp/msp430/family.mk @@ -1,5 +1,5 @@ CROSS_COMPILE = msp430-elf- -DEPS_SUBMODULES = hw/mcu/ti +DEPS_SUBMODULES += hw/mcu/ti SKIP_NANOLIB = 1 CFLAGS += \ diff --git a/hw/bsp/ngx4330/board.mk b/hw/bsp/ngx4330/board.mk index 6dbec1ee..0a0cb3ba 100644 --- a/hw/bsp/ngx4330/board.mk +++ b/hw/bsp/ngx4330/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/nxp +DEPS_SUBMODULES += hw/mcu/nxp CFLAGS += \ -flto \ diff --git a/hw/bsp/nrf/family.mk b/hw/bsp/nrf/family.mk index 90144f96..d1afd258 100644 --- a/hw/bsp/nrf/family.mk +++ b/hw/bsp/nrf/family.mk @@ -1,5 +1,5 @@ UF2_FAMILY_ID = 0xADA52840 -DEPS_SUBMODULES = lib/CMSIS_5 hw/mcu/nordic/nrfx +DEPS_SUBMODULES += lib/CMSIS_5 hw/mcu/nordic/nrfx include $(TOP)/$(BOARD_PATH)/board.mk diff --git a/hw/bsp/nutiny_nuc121s/board.mk b/hw/bsp/nutiny_nuc121s/board.mk index c3fb1be9..a0a208ca 100644 --- a/hw/bsp/nutiny_nuc121s/board.mk +++ b/hw/bsp/nutiny_nuc121s/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/nuvoton +DEPS_SUBMODULES += hw/mcu/nuvoton CFLAGS += \ -flto \ diff --git a/hw/bsp/nutiny_nuc125s/board.mk b/hw/bsp/nutiny_nuc125s/board.mk index 6bf10ef0..bb56e42a 100644 --- a/hw/bsp/nutiny_nuc125s/board.mk +++ b/hw/bsp/nutiny_nuc125s/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/nuvoton +DEPS_SUBMODULES += hw/mcu/nuvoton CFLAGS += \ -flto \ diff --git a/hw/bsp/nutiny_nuc126v/board.mk b/hw/bsp/nutiny_nuc126v/board.mk index d1ccd46a..848b19f9 100644 --- a/hw/bsp/nutiny_nuc126v/board.mk +++ b/hw/bsp/nutiny_nuc126v/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/nuvoton +DEPS_SUBMODULES += hw/mcu/nuvoton CFLAGS += \ -flto \ diff --git a/hw/bsp/nutiny_sdk_nuc120/board.mk b/hw/bsp/nutiny_sdk_nuc120/board.mk index bfb71ffb..90b3e91f 100644 --- a/hw/bsp/nutiny_sdk_nuc120/board.mk +++ b/hw/bsp/nutiny_sdk_nuc120/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/nuvoton +DEPS_SUBMODULES += hw/mcu/nuvoton CFLAGS += \ -flto \ diff --git a/hw/bsp/nutiny_sdk_nuc505/board.mk b/hw/bsp/nutiny_sdk_nuc505/board.mk index 51560a4e..e8514347 100644 --- a/hw/bsp/nutiny_sdk_nuc505/board.mk +++ b/hw/bsp/nutiny_sdk_nuc505/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/nuvoton +DEPS_SUBMODULES += hw/mcu/nuvoton CFLAGS += \ -flto \ diff --git a/hw/bsp/rp2040/family.mk b/hw/bsp/rp2040/family.mk index c953840b..ed7b1156 100644 --- a/hw/bsp/rp2040/family.mk +++ b/hw/bsp/rp2040/family.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/raspberrypi/pico-sdk +DEPS_SUBMODULES += hw/mcu/raspberrypi/pico-sdk ifeq ($(DEBUG), 1) CMAKE_DEFSYM += -DCMAKE_BUILD_TYPE=Debug diff --git a/hw/bsp/samd11/family.mk b/hw/bsp/samd11/family.mk index 653eb706..6fbdc35a 100644 --- a/hw/bsp/samd11/family.mk +++ b/hw/bsp/samd11/family.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/microchip +DEPS_SUBMODULES += hw/mcu/microchip include $(TOP)/$(BOARD_PATH)/board.mk diff --git a/hw/bsp/samd21/family.mk b/hw/bsp/samd21/family.mk index abd2393a..f1b063f2 100644 --- a/hw/bsp/samd21/family.mk +++ b/hw/bsp/samd21/family.mk @@ -1,5 +1,5 @@ UF2_FAMILY_ID = 0x68ed2b88 -DEPS_SUBMODULES = hw/mcu/microchip +DEPS_SUBMODULES += hw/mcu/microchip include $(TOP)/$(BOARD_PATH)/board.mk diff --git a/hw/bsp/samd51/family.mk b/hw/bsp/samd51/family.mk index 841708a7..f4e260fb 100644 --- a/hw/bsp/samd51/family.mk +++ b/hw/bsp/samd51/family.mk @@ -1,5 +1,5 @@ UF2_FAMILY_ID = 0x55114460 -DEPS_SUBMODULES = hw/mcu/microchip +DEPS_SUBMODULES += hw/mcu/microchip include $(TOP)/$(BOARD_PATH)/board.mk diff --git a/hw/bsp/same54xplainedpro/board.mk b/hw/bsp/same54xplainedpro/board.mk index f43a5fde..7325a5ff 100644 --- a/hw/bsp/same54xplainedpro/board.mk +++ b/hw/bsp/same54xplainedpro/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/microchip +DEPS_SUBMODULES += hw/mcu/microchip CONF_CPU_FREQUENCY ?= 120000000 diff --git a/hw/bsp/same70_xplained/board.mk b/hw/bsp/same70_xplained/board.mk index 0b3f0387..90ffbb70 100644 --- a/hw/bsp/same70_xplained/board.mk +++ b/hw/bsp/same70_xplained/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/microchip +DEPS_SUBMODULES += hw/mcu/microchip CFLAGS += \ -mthumb \ diff --git a/hw/bsp/samg55xplained/board.mk b/hw/bsp/samg55xplained/board.mk index 1a1a3ffe..aed4de68 100644 --- a/hw/bsp/samg55xplained/board.mk +++ b/hw/bsp/samg55xplained/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/microchip +DEPS_SUBMODULES += hw/mcu/microchip CFLAGS += \ -flto \ diff --git a/hw/bsp/spresense/board.mk b/hw/bsp/spresense/board.mk index 37cb957c..a46c42bd 100644 --- a/hw/bsp/spresense/board.mk +++ b/hw/bsp/spresense/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES = hw/mcu/sony/cxd56/spresense-exported-sdk +DEPS_SUBMODULES += hw/mcu/sony/cxd56/spresense-exported-sdk # Platforms are: Linux, Darwin, MSYS, CYGWIN PLATFORM := $(firstword $(subst _, ,$(shell uname -s 2>/dev/null))) diff --git a/hw/bsp/stm32f070rbnucleo/board.mk b/hw/bsp/stm32f070rbnucleo/board.mk index 1478b282..78dd0a39 100644 --- a/hw/bsp/stm32f070rbnucleo/board.mk +++ b/hw/bsp/stm32f070rbnucleo/board.mk @@ -1,5 +1,5 @@ ST_FAMILY = f0 -DEPS_SUBMODULES = lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver +DEPS_SUBMODULES += lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY) ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver diff --git a/hw/bsp/stm32f072disco/board.mk b/hw/bsp/stm32f072disco/board.mk index 6f38f481..071c42b6 100644 --- a/hw/bsp/stm32f072disco/board.mk +++ b/hw/bsp/stm32f072disco/board.mk @@ -1,5 +1,5 @@ ST_FAMILY = f0 -DEPS_SUBMODULES = lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver +DEPS_SUBMODULES += lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY) ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver diff --git a/hw/bsp/stm32f103bluepill/board.mk b/hw/bsp/stm32f103bluepill/board.mk index 1e0b0f53..656a3732 100644 --- a/hw/bsp/stm32f103bluepill/board.mk +++ b/hw/bsp/stm32f103bluepill/board.mk @@ -1,5 +1,5 @@ ST_FAMILY = f1 -DEPS_SUBMODULES = lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver +DEPS_SUBMODULES += lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY) ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver diff --git a/hw/bsp/stm32f207nucleo/board.mk b/hw/bsp/stm32f207nucleo/board.mk index a01f35ad..2b979f3d 100644 --- a/hw/bsp/stm32f207nucleo/board.mk +++ b/hw/bsp/stm32f207nucleo/board.mk @@ -1,5 +1,5 @@ ST_FAMILY = f2 -DEPS_SUBMODULES = lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver +DEPS_SUBMODULES += lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY) ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver diff --git a/hw/bsp/stm32f303disco/board.mk b/hw/bsp/stm32f303disco/board.mk index 6cd67da0..9dd27a85 100644 --- a/hw/bsp/stm32f303disco/board.mk +++ b/hw/bsp/stm32f303disco/board.mk @@ -1,5 +1,5 @@ ST_FAMILY = f3 -DEPS_SUBMODULES = lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver +DEPS_SUBMODULES += lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY) ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver diff --git a/hw/bsp/stm32f4/family.mk b/hw/bsp/stm32f4/family.mk index bf0bfadf..584d6940 100644 --- a/hw/bsp/stm32f4/family.mk +++ b/hw/bsp/stm32f4/family.mk @@ -1,6 +1,6 @@ UF2_FAMILY_ID = 0x57755a57 ST_FAMILY = f4 -DEPS_SUBMODULES = lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver +DEPS_SUBMODULES += lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY) ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver diff --git a/hw/bsp/stm32f7/family.mk b/hw/bsp/stm32f7/family.mk index be0bd2a6..ead0c977 100644 --- a/hw/bsp/stm32f7/family.mk +++ b/hw/bsp/stm32f7/family.mk @@ -1,6 +1,6 @@ UF2_FAMILY_ID = 0x53b80f00 ST_FAMILY = f7 -DEPS_SUBMODULES = lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver +DEPS_SUBMODULES += lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY) ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver diff --git a/hw/bsp/stm32h7/family.mk b/hw/bsp/stm32h7/family.mk index da21ef6f..e35e7561 100644 --- a/hw/bsp/stm32h7/family.mk +++ b/hw/bsp/stm32h7/family.mk @@ -1,6 +1,6 @@ UF2_FAMILY_ID = 0x6db66082 ST_FAMILY = h7 -DEPS_SUBMODULES = lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver +DEPS_SUBMODULES += lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY) ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver diff --git a/hw/bsp/stm32l0538disco/board.mk b/hw/bsp/stm32l0538disco/board.mk index 500674f8..c46887f1 100644 --- a/hw/bsp/stm32l0538disco/board.mk +++ b/hw/bsp/stm32l0538disco/board.mk @@ -1,5 +1,5 @@ ST_FAMILY = l0 -DEPS_SUBMODULES = lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver +DEPS_SUBMODULES += lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY) ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver diff --git a/hw/bsp/stm32l476disco/board.mk b/hw/bsp/stm32l476disco/board.mk index 414e3d4f..28824efd 100644 --- a/hw/bsp/stm32l476disco/board.mk +++ b/hw/bsp/stm32l476disco/board.mk @@ -1,5 +1,5 @@ ST_FAMILY = l4 -DEPS_SUBMODULES = lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver +DEPS_SUBMODULES += lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY) ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver diff --git a/hw/bsp/stm32l4r5nucleo/board.mk b/hw/bsp/stm32l4r5nucleo/board.mk index d6808182..12a291d0 100644 --- a/hw/bsp/stm32l4r5nucleo/board.mk +++ b/hw/bsp/stm32l4r5nucleo/board.mk @@ -1,5 +1,5 @@ ST_FAMILY = l4 -DEPS_SUBMODULES = lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver +DEPS_SUBMODULES += lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY) ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver From 249852d25ced9852eb7f95dcc38b2a82b4c02390 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 18 Mar 2021 19:53:39 +0700 Subject: [PATCH 19/72] use boot2_generic_03h for adafruit feather rp2040 - also use boot2_generic_03h for now for itsy bitsy and qt rp2040 - change default flash target for rp2040 to flash-pyocd --- examples/device/audio_test/CMakeLists.txt | 3 ++- examples/device/board_test/CMakeLists.txt | 4 +++- examples/device/cdc_dual_ports/CMakeLists.txt | 3 ++- examples/device/cdc_msc/CMakeLists.txt | 3 +-- examples/device/dfu_runtime/CMakeLists.txt | 3 ++- examples/device/dynamic_configuration/CMakeLists.txt | 3 ++- examples/device/hid_composite/CMakeLists.txt | 3 ++- examples/device/hid_generic_inout/CMakeLists.txt | 3 ++- examples/device/hid_multiple_interface/CMakeLists.txt | 3 ++- examples/device/midi_test/CMakeLists.txt | 3 ++- examples/device/msc_dual_lun/CMakeLists.txt | 3 ++- examples/device/net_lwip_webserver/CMakeLists.txt | 3 ++- examples/device/uac2_headset/CMakeLists.txt | 3 ++- examples/device/usbtmc/CMakeLists.txt | 2 +- examples/device/webusb_serial/CMakeLists.txt | 3 ++- examples/host/cdc_msc_hid/CMakeLists.txt | 3 ++- .../rp2040/boards/adafruit_feather_rp2040/board.cmake | 1 + .../boards/adafruit_itsybitsy_rp2040/board.cmake | 1 + hw/bsp/rp2040/boards/adafruit_qt_rp2040/board.cmake | 1 + hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake | 1 + hw/bsp/rp2040/family.cmake | 6 ++++++ hw/bsp/rp2040/family.mk | 10 +++++----- 22 files changed, 46 insertions(+), 22 deletions(-) create mode 100644 hw/bsp/rp2040/boards/adafruit_feather_rp2040/board.cmake create mode 100644 hw/bsp/rp2040/boards/adafruit_itsybitsy_rp2040/board.cmake create mode 100644 hw/bsp/rp2040/boards/adafruit_qt_rp2040/board.cmake create mode 100644 hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake diff --git a/examples/device/audio_test/CMakeLists.txt b/examples/device/audio_test/CMakeLists.txt index 7038dd04..03f2439e 100644 --- a/examples/device/audio_test/CMakeLists.txt +++ b/examples/device/audio_test/CMakeLists.txt @@ -9,10 +9,11 @@ get_filename_component(TOP "${TOP}" REALPATH) # Check for -DFAMILY= if(FAMILY STREQUAL "rp2040") cmake_minimum_required(VERSION 3.12) + set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk) include(${PICO_SDK_PATH}/pico_sdk_init.cmake) + project(${PROJECT}) - pico_sdk_init() add_executable(${PROJECT}) include(${TOP}/hw/bsp/${FAMILY}/family.cmake) diff --git a/examples/device/board_test/CMakeLists.txt b/examples/device/board_test/CMakeLists.txt index 4e6a9b3f..b4c4ce4d 100644 --- a/examples/device/board_test/CMakeLists.txt +++ b/examples/device/board_test/CMakeLists.txt @@ -9,15 +9,17 @@ get_filename_component(TOP "${TOP}" REALPATH) # Check for -DFAMILY= if(FAMILY STREQUAL "esp32s2") cmake_minimum_required(VERSION 3.5) + include(${TOP}/hw/bsp/${FAMILY}/family.cmake) project(${PROJECT}) elseif(FAMILY STREQUAL "rp2040") cmake_minimum_required(VERSION 3.12) + set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk) include(${PICO_SDK_PATH}/pico_sdk_init.cmake) + project(${PROJECT}) - pico_sdk_init() add_executable(${PROJECT}) include(${TOP}/hw/bsp/${FAMILY}/family.cmake) diff --git a/examples/device/cdc_dual_ports/CMakeLists.txt b/examples/device/cdc_dual_ports/CMakeLists.txt index 5e3ec090..94e4fc1f 100644 --- a/examples/device/cdc_dual_ports/CMakeLists.txt +++ b/examples/device/cdc_dual_ports/CMakeLists.txt @@ -9,10 +9,11 @@ get_filename_component(TOP "${TOP}" REALPATH) # Check for -DFAMILY= if(FAMILY STREQUAL "rp2040") cmake_minimum_required(VERSION 3.12) + set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk) include(${PICO_SDK_PATH}/pico_sdk_init.cmake) + project(${PROJECT}) - pico_sdk_init() add_executable(${PROJECT}) include(${TOP}/hw/bsp/${FAMILY}/family.cmake) diff --git a/examples/device/cdc_msc/CMakeLists.txt b/examples/device/cdc_msc/CMakeLists.txt index 41dd167b..f6cf6452 100644 --- a/examples/device/cdc_msc/CMakeLists.txt +++ b/examples/device/cdc_msc/CMakeLists.txt @@ -17,9 +17,8 @@ elseif(FAMILY STREQUAL "rp2040") set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk) include(${PICO_SDK_PATH}/pico_sdk_init.cmake) project(${PROJECT}) - pico_sdk_init() add_executable(${PROJECT}) - + include(${TOP}/hw/bsp/${FAMILY}/family.cmake) # Example source diff --git a/examples/device/dfu_runtime/CMakeLists.txt b/examples/device/dfu_runtime/CMakeLists.txt index 5e3ec090..ea294b3b 100644 --- a/examples/device/dfu_runtime/CMakeLists.txt +++ b/examples/device/dfu_runtime/CMakeLists.txt @@ -9,10 +9,11 @@ get_filename_component(TOP "${TOP}" REALPATH) # Check for -DFAMILY= if(FAMILY STREQUAL "rp2040") cmake_minimum_required(VERSION 3.12) + set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk) include(${PICO_SDK_PATH}/pico_sdk_init.cmake) + project(${PROJECT}) - pico_sdk_init() add_executable(${PROJECT}) include(${TOP}/hw/bsp/${FAMILY}/family.cmake) diff --git a/examples/device/dynamic_configuration/CMakeLists.txt b/examples/device/dynamic_configuration/CMakeLists.txt index be622436..09a8dcc4 100644 --- a/examples/device/dynamic_configuration/CMakeLists.txt +++ b/examples/device/dynamic_configuration/CMakeLists.txt @@ -9,10 +9,11 @@ get_filename_component(TOP "${TOP}" REALPATH) # Check for -DFAMILY= if(FAMILY STREQUAL "rp2040") cmake_minimum_required(VERSION 3.12) + set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk) include(${PICO_SDK_PATH}/pico_sdk_init.cmake) + project(${PROJECT}) - pico_sdk_init() add_executable(${PROJECT}) include(${TOP}/hw/bsp/${FAMILY}/family.cmake) diff --git a/examples/device/hid_composite/CMakeLists.txt b/examples/device/hid_composite/CMakeLists.txt index 5e3ec090..c85f2ace 100644 --- a/examples/device/hid_composite/CMakeLists.txt +++ b/examples/device/hid_composite/CMakeLists.txt @@ -9,10 +9,11 @@ get_filename_component(TOP "${TOP}" REALPATH) # Check for -DFAMILY= if(FAMILY STREQUAL "rp2040") cmake_minimum_required(VERSION 3.12) + set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk) include(${PICO_SDK_PATH}/pico_sdk_init.cmake) + project(${PROJECT}) - pico_sdk_init() add_executable(${PROJECT}) include(${TOP}/hw/bsp/${FAMILY}/family.cmake) diff --git a/examples/device/hid_generic_inout/CMakeLists.txt b/examples/device/hid_generic_inout/CMakeLists.txt index 5e3ec090..5de4a932 100644 --- a/examples/device/hid_generic_inout/CMakeLists.txt +++ b/examples/device/hid_generic_inout/CMakeLists.txt @@ -9,10 +9,11 @@ get_filename_component(TOP "${TOP}" REALPATH) # Check for -DFAMILY= if(FAMILY STREQUAL "rp2040") cmake_minimum_required(VERSION 3.12) + set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk) include(${PICO_SDK_PATH}/pico_sdk_init.cmake) + project(${PROJECT}) - pico_sdk_init() add_executable(${PROJECT}) include(${TOP}/hw/bsp/${FAMILY}/family.cmake) diff --git a/examples/device/hid_multiple_interface/CMakeLists.txt b/examples/device/hid_multiple_interface/CMakeLists.txt index 5e3ec090..5de4a932 100644 --- a/examples/device/hid_multiple_interface/CMakeLists.txt +++ b/examples/device/hid_multiple_interface/CMakeLists.txt @@ -9,10 +9,11 @@ get_filename_component(TOP "${TOP}" REALPATH) # Check for -DFAMILY= if(FAMILY STREQUAL "rp2040") cmake_minimum_required(VERSION 3.12) + set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk) include(${PICO_SDK_PATH}/pico_sdk_init.cmake) + project(${PROJECT}) - pico_sdk_init() add_executable(${PROJECT}) include(${TOP}/hw/bsp/${FAMILY}/family.cmake) diff --git a/examples/device/midi_test/CMakeLists.txt b/examples/device/midi_test/CMakeLists.txt index 5e3ec090..5de4a932 100644 --- a/examples/device/midi_test/CMakeLists.txt +++ b/examples/device/midi_test/CMakeLists.txt @@ -9,10 +9,11 @@ get_filename_component(TOP "${TOP}" REALPATH) # Check for -DFAMILY= if(FAMILY STREQUAL "rp2040") cmake_minimum_required(VERSION 3.12) + set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk) include(${PICO_SDK_PATH}/pico_sdk_init.cmake) + project(${PROJECT}) - pico_sdk_init() add_executable(${PROJECT}) include(${TOP}/hw/bsp/${FAMILY}/family.cmake) diff --git a/examples/device/msc_dual_lun/CMakeLists.txt b/examples/device/msc_dual_lun/CMakeLists.txt index 0036dc68..48e183ed 100644 --- a/examples/device/msc_dual_lun/CMakeLists.txt +++ b/examples/device/msc_dual_lun/CMakeLists.txt @@ -9,10 +9,11 @@ get_filename_component(TOP "${TOP}" REALPATH) # Check for -DFAMILY= if(FAMILY STREQUAL "rp2040") cmake_minimum_required(VERSION 3.12) + set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk) include(${PICO_SDK_PATH}/pico_sdk_init.cmake) + project(${PROJECT}) - pico_sdk_init() add_executable(${PROJECT}) include(${TOP}/hw/bsp/${FAMILY}/family.cmake) diff --git a/examples/device/net_lwip_webserver/CMakeLists.txt b/examples/device/net_lwip_webserver/CMakeLists.txt index c9aabc63..69a242be 100644 --- a/examples/device/net_lwip_webserver/CMakeLists.txt +++ b/examples/device/net_lwip_webserver/CMakeLists.txt @@ -9,10 +9,11 @@ get_filename_component(TOP "${TOP}" REALPATH) # Check for -DFAMILY= if(FAMILY STREQUAL "rp2040") cmake_minimum_required(VERSION 3.12) + set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk) include(${PICO_SDK_PATH}/pico_sdk_init.cmake) + project(${PROJECT}) - pico_sdk_init() add_executable(${PROJECT}) include(${TOP}/hw/bsp/${FAMILY}/family.cmake) diff --git a/examples/device/uac2_headset/CMakeLists.txt b/examples/device/uac2_headset/CMakeLists.txt index 5e3ec090..5de4a932 100644 --- a/examples/device/uac2_headset/CMakeLists.txt +++ b/examples/device/uac2_headset/CMakeLists.txt @@ -9,10 +9,11 @@ get_filename_component(TOP "${TOP}" REALPATH) # Check for -DFAMILY= if(FAMILY STREQUAL "rp2040") cmake_minimum_required(VERSION 3.12) + set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk) include(${PICO_SDK_PATH}/pico_sdk_init.cmake) + project(${PROJECT}) - pico_sdk_init() add_executable(${PROJECT}) include(${TOP}/hw/bsp/${FAMILY}/family.cmake) diff --git a/examples/device/usbtmc/CMakeLists.txt b/examples/device/usbtmc/CMakeLists.txt index 808bdbcf..f40d123b 100644 --- a/examples/device/usbtmc/CMakeLists.txt +++ b/examples/device/usbtmc/CMakeLists.txt @@ -11,8 +11,8 @@ if(FAMILY STREQUAL "rp2040") cmake_minimum_required(VERSION 3.12) set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk) include(${PICO_SDK_PATH}/pico_sdk_init.cmake) + project(${PROJECT}) - pico_sdk_init() add_executable(${PROJECT}) include(${TOP}/hw/bsp/${FAMILY}/family.cmake) diff --git a/examples/device/webusb_serial/CMakeLists.txt b/examples/device/webusb_serial/CMakeLists.txt index 5e3ec090..5de4a932 100644 --- a/examples/device/webusb_serial/CMakeLists.txt +++ b/examples/device/webusb_serial/CMakeLists.txt @@ -9,10 +9,11 @@ get_filename_component(TOP "${TOP}" REALPATH) # Check for -DFAMILY= if(FAMILY STREQUAL "rp2040") cmake_minimum_required(VERSION 3.12) + set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk) include(${PICO_SDK_PATH}/pico_sdk_init.cmake) + project(${PROJECT}) - pico_sdk_init() add_executable(${PROJECT}) include(${TOP}/hw/bsp/${FAMILY}/family.cmake) diff --git a/examples/host/cdc_msc_hid/CMakeLists.txt b/examples/host/cdc_msc_hid/CMakeLists.txt index 2302678b..7413e408 100644 --- a/examples/host/cdc_msc_hid/CMakeLists.txt +++ b/examples/host/cdc_msc_hid/CMakeLists.txt @@ -14,10 +14,11 @@ if(FAMILY STREQUAL "esp32s2") elseif(FAMILY STREQUAL "rp2040") cmake_minimum_required(VERSION 3.12) + set(PICO_SDK_PATH ${TOP}/hw/mcu/raspberrypi/pico-sdk) include(${PICO_SDK_PATH}/pico_sdk_init.cmake) + project(${PROJECT}) - pico_sdk_init() add_executable(${PROJECT}) include(${TOP}/hw/bsp/${FAMILY}/family.cmake) diff --git a/hw/bsp/rp2040/boards/adafruit_feather_rp2040/board.cmake b/hw/bsp/rp2040/boards/adafruit_feather_rp2040/board.cmake new file mode 100644 index 00000000..ea4070cf --- /dev/null +++ b/hw/bsp/rp2040/boards/adafruit_feather_rp2040/board.cmake @@ -0,0 +1 @@ +set(PICO_DEFAULT_BOOT_STAGE2_FILE "${PICO_SDK_PATH}/src/rp2_common/boot_stage2/boot2_generic_03h.S") diff --git a/hw/bsp/rp2040/boards/adafruit_itsybitsy_rp2040/board.cmake b/hw/bsp/rp2040/boards/adafruit_itsybitsy_rp2040/board.cmake new file mode 100644 index 00000000..ea4070cf --- /dev/null +++ b/hw/bsp/rp2040/boards/adafruit_itsybitsy_rp2040/board.cmake @@ -0,0 +1 @@ +set(PICO_DEFAULT_BOOT_STAGE2_FILE "${PICO_SDK_PATH}/src/rp2_common/boot_stage2/boot2_generic_03h.S") diff --git a/hw/bsp/rp2040/boards/adafruit_qt_rp2040/board.cmake b/hw/bsp/rp2040/boards/adafruit_qt_rp2040/board.cmake new file mode 100644 index 00000000..ea4070cf --- /dev/null +++ b/hw/bsp/rp2040/boards/adafruit_qt_rp2040/board.cmake @@ -0,0 +1 @@ +set(PICO_DEFAULT_BOOT_STAGE2_FILE "${PICO_SDK_PATH}/src/rp2_common/boot_stage2/boot2_generic_03h.S") diff --git a/hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake b/hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake new file mode 100644 index 00000000..eb9f219d --- /dev/null +++ b/hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake @@ -0,0 +1 @@ +set(PICO_DEFAULT_BOOT_STAGE2_FILE "${PICO_SDK_PATH}/src/rp2_common/boot_stage2/boot2_w25q080.S") diff --git a/hw/bsp/rp2040/family.cmake b/hw/bsp/rp2040/family.cmake index af23c236..63c7daa3 100644 --- a/hw/bsp/rp2040/family.cmake +++ b/hw/bsp/rp2040/family.cmake @@ -1,3 +1,9 @@ +# Board specific define e.g boot stage2 +# PICO_DEFAULT_BOOT_STAGE2_FILE must be set before pico_sdk_init() +include(${TOP}/hw/bsp/${FAMILY}/boards/${BOARD}/board.cmake) + +pico_sdk_init() + target_link_libraries(${PROJECT} pico_stdlib pico_bootsel_via_double_reset diff --git a/hw/bsp/rp2040/family.mk b/hw/bsp/rp2040/family.mk index ed7b1156..6df36732 100644 --- a/hw/bsp/rp2040/family.mk +++ b/hw/bsp/rp2040/family.mk @@ -1,5 +1,8 @@ DEPS_SUBMODULES += hw/mcu/raspberrypi/pico-sdk +JLINK_DEVICE = rp2040_m0_0 +PYOCD_TARGET = rp2040 + ifeq ($(DEBUG), 1) CMAKE_DEFSYM += -DCMAKE_BUILD_TYPE=Debug endif @@ -13,9 +16,6 @@ all: $(BUILD) clean: $(RM) -rf $(BUILD) -#flash: flash-pyocd -flash: +flash: flash-pyocd +flash-uf2: @$(CP) $(BUILD)/$(PROJECT).uf2 /media/$(USER)/RPI-RP2 - -JLINK_DEVICE = rp2040_m0_0 -PYOCD_TARGET = rp2040 From c86e4c8bd3bf6f23f12daee5584bdab8cd4f9ebc Mon Sep 17 00:00:00 2001 From: Ha Thach Date: Thu, 18 Mar 2021 20:56:26 +0700 Subject: [PATCH 20/72] Update boards.md --- docs/boards.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/boards.md b/docs/boards.md index 27514311..2b42b4d8 100644 --- a/docs/boards.md +++ b/docs/boards.md @@ -9,6 +9,11 @@ The board support code is only used for self-contained examples and testing. It This code base already had supported for a handful of following boards (sorted alphabetically) +### Dialog DA146xx + +- [DA14695 Development Kit – USB](https://www.dialog-semiconductor.com/products/da14695-development-kit-usb) +- [DA1469x Development Kit – Pro](https://www.dialog-semiconductor.com/products/da14695-development-kit-pro) + ### Espressif ESP32-S2 - Adafruit Feather ESP32-S2 @@ -17,11 +22,6 @@ This code base already had supported for a handful of following boards (sorted a - [ESP32-S2-Kaluga-1](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-esp32-s2-kaluga-1-kit.html) - [ESP32-S2-Saola-1](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-saola-1-v1.2.html) -### Dialog DA146xx - -- [DA14695 Development Kit – USB](https://www.dialog-semiconductor.com/products/da14695-development-kit-usb) -- [DA1469x Development Kit – Pro](https://www.dialog-semiconductor.com/products/da14695-development-kit-pro) - ### MicroChip SAMD11 & SAMD21 - [Adafruit Circuit Playground Express](https://www.adafruit.com/product/3333) From 6cf110b5d0efc8556fbb7aeabef583d8c000ae4b Mon Sep 17 00:00:00 2001 From: Ha Thach Date: Fri, 19 Mar 2021 00:32:29 +0700 Subject: [PATCH 21/72] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d4a0b38c..f5bd7ced 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,8 @@ Special thanks to all the people who spent their precious time and effort to hel The stack supports the following MCUs: -- **Espressif:** ESP32-S2 - **Dialog:** DA1469x +- **Espressif:** ESP32-S2 - **MicroChip:** SAMD11, SAMD21, SAMD51, SAME5x, SAMG55 - **NordicSemi:** nRF52833, nRF52840 - **Nuvoton:** NUC120, NUC121/NUC125, NUC126, NUC505 From a22206b77a237c1f8407c13ce519f642c73feaea Mon Sep 17 00:00:00 2001 From: Ha Thach Date: Fri, 19 Mar 2021 11:15:58 +0700 Subject: [PATCH 22/72] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 1e1ffb7c..e3a083ab 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,24 +7,29 @@ assignees: '' --- -Please provide details for all required fields, otherwise issue could be CLOSED and/or LOCKED. +REMOVE ME: please provide all details at least for Setup/Describe/Reproduce. + +**Set Up** -**Set Up (required)** - **PC OS** e.g Ubuntu 20.04 / Windows 10/ macOS 10.15 - **Board** e.g Feather nRF52840 Express (if custom specify your MCUs) - **Firmware** e.g examples/device/cdc_msc -**Describe The Bug (required)** +**Describe The Bug** + A clear and concise description of what the bug is. -**To Reproduce (required)** +**To Reproduce** + Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. See error **Screenshots** + If applicable, add screenshots, bus capture to help explain your problem. **Log** + If applicable, provide the stack's log (uart/rtt/swo) where the issue occurred, best with comments to explain the actual events. To enable logging, add `LOG=2` to to the make command if building with stock examples or set `CFG_TUSB_DEBUG=2` in your tusb_config.h. More information can be found at [example's readme](/docs/getting_started.md) From 7cdeed54e0dbd6f927020042dbdedf2d4d21cf97 Mon Sep 17 00:00:00 2001 From: Ha Thach Date: Fri, 19 Mar 2021 11:17:38 +0700 Subject: [PATCH 23/72] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index e3a083ab..797f6f92 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,14 +1,12 @@ --- name: Bug Report about: Create a report to help us improve -title: '' +title: 'Please provide all details at least for Setup/Describe/Reproduce' labels: Bug 🐞 assignees: '' --- -REMOVE ME: please provide all details at least for Setup/Describe/Reproduce. - **Set Up** - **PC OS** e.g Ubuntu 20.04 / Windows 10/ macOS 10.15 From aa54135087b396c563c08a528a829f622e1a4fce Mon Sep 17 00:00:00 2001 From: Ned Konz Date: Fri, 19 Mar 2021 10:57:58 -0700 Subject: [PATCH 24/72] Initial commit; copied from stmf072-disco and modified for -EVAL board --- hw/bsp/stm32f072eval/STM32F072VBTX_FLASH.ld | 177 +++++++++++ hw/bsp/stm32f072eval/board.mk | 50 +++ hw/bsp/stm32f072eval/stm32f072eval.c | 248 +++++++++++++++ hw/bsp/stm32f072eval/stm32f0xx_hal_conf.h | 321 ++++++++++++++++++++ 4 files changed, 796 insertions(+) create mode 100644 hw/bsp/stm32f072eval/STM32F072VBTX_FLASH.ld create mode 100644 hw/bsp/stm32f072eval/board.mk create mode 100644 hw/bsp/stm32f072eval/stm32f072eval.c create mode 100644 hw/bsp/stm32f072eval/stm32f0xx_hal_conf.h diff --git a/hw/bsp/stm32f072eval/STM32F072VBTX_FLASH.ld b/hw/bsp/stm32f072eval/STM32F072VBTX_FLASH.ld new file mode 100644 index 00000000..581613a5 --- /dev/null +++ b/hw/bsp/stm32f072eval/STM32F072VBTX_FLASH.ld @@ -0,0 +1,177 @@ +/** + ****************************************************************************** + * @file LinkerScript.ld + * @author Auto-generated by STM32CubeIDE + * Abstract : Linker script for STM32072B-EVAL Board embedding STM32F072VBTx Device from stm32f0 series + * 128Kbytes FLASH + * 16Kbytes RAM + * + * Set heap size, stack size and stack location according + * to application requirements. + * + * Set memory bank area and size if external memory is used + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2020 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ + +_Min_Heap_Size = 0x200 ; /* required amount of heap */ +_Min_Stack_Size = 0x400 ; /* required amount of stack */ + +/* Memories definition */ +MEMORY +{ + RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 16K + FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 128K +} + +/* Sections */ +SECTIONS +{ + /* The startup code into "FLASH" Rom type memory */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data into "FLASH" Rom type memory */ + .text : + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data into "FLASH" Rom type memory */ + .rodata : + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { + . = ALIGN(4); + *(.ARM.extab* .gnu.linkonce.armextab.*) + . = ALIGN(4); + } >FLASH + + .ARM : { + . = ALIGN(4); + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + . = ALIGN(4); + } >FLASH + + .preinit_array : + { + . = ALIGN(4); + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + . = ALIGN(4); + } >FLASH + + .init_array : + { + . = ALIGN(4); + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + . = ALIGN(4); + } >FLASH + + .fini_array : + { + . = ALIGN(4); + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + . = ALIGN(4); + } >FLASH + + /* Used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections into "RAM" Ram type memory */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + *(.RamFunc) /* .RamFunc sections */ + *(.RamFunc*) /* .RamFunc* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + + } >RAM AT> FLASH + + /* Uninitialized data section into "RAM" Ram type memory */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss section */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ + ._user_heap_stack : + { + . = ALIGN(8); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(8); + } >RAM + + /* Remove information from the compiler libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } +} diff --git a/hw/bsp/stm32f072eval/board.mk b/hw/bsp/stm32f072eval/board.mk new file mode 100644 index 00000000..f5c66505 --- /dev/null +++ b/hw/bsp/stm32f072eval/board.mk @@ -0,0 +1,50 @@ +ST_FAMILY = f0 +DEPS_SUBMODULES += lib/CMSIS_5 hw/mcu/st/cmsis_device_$(ST_FAMILY) hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver + +ST_CMSIS = hw/mcu/st/cmsis_device_$(ST_FAMILY) +ST_HAL_DRIVER = hw/mcu/st/stm32$(ST_FAMILY)xx_hal_driver + +CFLAGS += \ + -flto \ + -mthumb \ + -mabi=aapcs \ + -mcpu=cortex-m0 \ + -mfloat-abi=soft \ + -nostdlib -nostartfiles \ + -DSTM32F072xB \ + -DCFG_EXAMPLE_MSC_READONLY \ + -DCFG_TUSB_MCU=OPT_MCU_STM32F0 + +# suppress warning caused by vendor mcu driver +CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align + +# All source paths should be relative to the top level. +LD_FILE = hw/bsp/$(BOARD)/STM32F072VBTx_FLASH.ld + +SRC_C += \ + src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c \ + $(ST_CMSIS)/Source/Templates/system_stm32$(ST_FAMILY)xx.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_cortex.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_rcc_ex.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_gpio.c \ + $(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_uart.c + +SRC_S += \ + $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f072xb.s + +INC += \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ + $(TOP)/$(ST_CMSIS)/Include \ + $(TOP)/$(ST_HAL_DRIVER)/Inc \ + $(TOP)/hw/bsp/$(BOARD) + +# For freeRTOS port source +FREERTOS_PORT = ARM_CM0 + +# For flash-jlink target +JLINK_DEVICE = stm32f072vb + +# flash target using on-board stlink +flash: flash-stlink diff --git a/hw/bsp/stm32f072eval/stm32f072eval.c b/hw/bsp/stm32f072eval/stm32f072eval.c new file mode 100644 index 00000000..ecc78674 --- /dev/null +++ b/hw/bsp/stm32f072eval/stm32f072eval.c @@ -0,0 +1,248 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2019 Ha Thach (tinyusb.org) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * This file is part of the TinyUSB stack. + */ + +#include "../board.h" +#include "stm32f0xx_hal.h" + +//--------------------------------------------------------------------+ +// Forward USB interrupt events to TinyUSB IRQ Handler +//--------------------------------------------------------------------+ +void USB_IRQHandler(void) +{ + tud_int_handler(0); +} + +//--------------------------------------------------------------------+ +// MACRO TYPEDEF CONSTANT ENUM +//--------------------------------------------------------------------+ +#define LED_PORT GPIOD +#define LED_PIN GPIO_PIN_8 // LED1, GREEN +// #define LED_PIN GPIO_PIN_9 // LED2, ORANGE +// #define LED_PIN GPIO_PIN_10 // LED3, RED +// #define LED_PIN GPIO_PIN_11 // LED4, BLUE +#define LED_STATE_ON 0 + +#define BUTTON_PORT GPIOA +#define BUTTON_PIN GPIO_PIN_0 // JOY_SEL +#define BUTTON_STATE_ACTIVE 1 + +#define UARTx USART2 +#define UART_GPIO_PORT GPIOD +#define UART_GPIO_AF GPIO_AF0_USART2 +#define UART_TX_PIN GPIO_PIN_5 +#define UART_RX_PIN GPIO_PIN_6 + +UART_HandleTypeDef UartHandle; + + +// enable all LED, Button, Uart, USB clock +static void all_rcc_clk_enable(void) +{ + __HAL_RCC_GPIOA_CLK_ENABLE(); // USB D+, D-, button + // __HAL_RCC_GPIOB_CLK_ENABLE(); + //__HAL_RCC_GPIOC_CLK_ENABLE(); + __HAL_RCC_GPIOD_CLK_ENABLE(); // Uart tx, rx, LED + __HAL_RCC_USART2_CLK_ENABLE(); // Uart module +} + +/** + * @brief System Clock Configuration + * The system Clock is configured as follow : + * System Clock source = PLL (HSI48) + * SYSCLK(Hz) = 48000000 + * HCLK(Hz) = 48000000 + * AHB Prescaler = 1 + * APB1 Prescaler = 1 + * HSI Frequency(Hz) = 48000000 + * PREDIV = 2 + * PLLMUL = 2 + * Flash Latency(WS) = 1 + * @param None + * @retval None + */ +static void SystemClock_Config(void) +{ + RCC_OscInitTypeDef RCC_OscInitStruct = {0}; + RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; + RCC_PeriphCLKInitTypeDef PeriphClkInit = {0}; + + /** Initializes the RCC Oscillators according to the specified parameters + * in the RCC_OscInitTypeDef structure. + */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48; + RCC_OscInitStruct.HSEState = RCC_HSE_OFF; + RCC_OscInitStruct.HSI48State = RCC_HSI48_ON; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; + RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6; + RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1; + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { + assert(false); + } + /** Initializes the CPU, AHB and APB buses clocks + */ + RCC_ClkInitStruct.ClockType = + RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_PCLK1; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) { + assert(false); + } + PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB | RCC_PERIPHCLK_USART2; + PeriphClkInit.Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1; + PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_HSI48; + + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) { + assert(false); + } +} + + +void board_init(void) +{ + SystemClock_Config(); + all_rcc_clk_enable(); + + #if CFG_TUSB_OS == OPT_OS_NONE + // 1ms tick timer + SysTick_Config(SystemCoreClock / 1000); + #endif + + // LED + GPIO_InitTypeDef GPIO_InitStruct; + GPIO_InitStruct.Pin = LED_PIN; + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Pull = GPIO_PULLUP; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + HAL_GPIO_Init(LED_PORT, &GPIO_InitStruct); + + // Button + GPIO_InitStruct.Pin = BUTTON_PIN; + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_PULLDOWN; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + HAL_GPIO_Init(BUTTON_PORT, &GPIO_InitStruct); + + // Uart + GPIO_InitStruct.Pin = UART_TX_PIN | UART_RX_PIN; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_PULLUP; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + GPIO_InitStruct.Alternate = UART_GPIO_AF; + HAL_GPIO_Init(UART_GPIO_PORT, &GPIO_InitStruct); + + UartHandle.Instance = UARTx; + UartHandle.Init.BaudRate = CFG_BOARD_UART_BAUDRATE; + UartHandle.Init.WordLength = UART_WORDLENGTH_8B; + UartHandle.Init.StopBits = UART_STOPBITS_1; + UartHandle.Init.Parity = UART_PARITY_NONE; + UartHandle.Init.HwFlowCtl = UART_HWCONTROL_NONE; + UartHandle.Init.Mode = UART_MODE_TX_RX; + UartHandle.Init.OverSampling = UART_OVERSAMPLING_16; + HAL_UART_Init(&UartHandle); + + // USB Pins + // Configure USB DM and DP pins. This is optional, and maintained only for user guidance. + GPIO_InitStruct.Pin = (GPIO_PIN_11 | GPIO_PIN_12); + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + + // USB Clock enable + __HAL_RCC_USB_CLK_ENABLE(); +} + +//--------------------------------------------------------------------+ +// Board porting API +//--------------------------------------------------------------------+ + +void board_led_write(bool state) +{ + HAL_GPIO_WritePin(LED_PORT, LED_PIN, state ? LED_STATE_ON : (1-LED_STATE_ON)); +} + +uint32_t board_button_read(void) +{ + return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN); +} + +int board_uart_read(uint8_t* buf, int len) +{ + (void) buf; (void) len; + return 0; +} + +int board_uart_write(void const * buf, int len) +{ + HAL_UART_Transmit(&UartHandle, (uint8_t*) buf, len, 0xffff); + return len; +} + +#if CFG_TUSB_OS == OPT_OS_NONE +volatile uint32_t system_ticks = 0; +void SysTick_Handler (void) +{ + system_ticks++; +} + +uint32_t board_millis(void) +{ + return system_ticks; +} +#endif + +void HardFault_Handler (void) +{ + asm("bkpt"); +} + +#ifdef USE_FULL_ASSERT +/** + * @brief Reports the name of the source file and the source line number + * where the assert_param error has occurred. + * @param file: pointer to the source file name + * @param line: assert_param error line source number + * @retval None + */ +void assert_failed(uint8_t* file, uint32_t line) +{ + (void) file; (void) line; + /* USER CODE BEGIN 6 */ + /* User can add his own implementation to report the file name and line number, + tex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ + /* USER CODE END 6 */ +} +#endif /* USE_FULL_ASSERT */ + +// Required by __libc_init_array in startup code if we are compiling using +// -nostdlib/-nostartfiles. +void _init(void) +{ + +} diff --git a/hw/bsp/stm32f072eval/stm32f0xx_hal_conf.h b/hw/bsp/stm32f072eval/stm32f0xx_hal_conf.h new file mode 100644 index 00000000..6fdf24f1 --- /dev/null +++ b/hw/bsp/stm32f072eval/stm32f0xx_hal_conf.h @@ -0,0 +1,321 @@ +/** + ****************************************************************************** + * @file stm32f0xx_hal_conf.h + * @author MCD Application Team + * @brief HAL configuration file. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2016 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F0xx_HAL_CONF_H +#define __STM32F0xx_HAL_CONF_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief This is the list of modules to be used in the HAL driver + */ +#define HAL_MODULE_ENABLED +/*#define HAL_ADC_MODULE_ENABLED */ +/*#define HAL_CAN_MODULE_ENABLED */ +/*#define HAL_CEC_MODULE_ENABLED */ +/*#define HAL_COMP_MODULE_ENABLED */ +#define HAL_CORTEX_MODULE_ENABLED +/*#define HAL_CRC_MODULE_ENABLED */ +/*#define HAL_DAC_MODULE_ENABLED */ +#define HAL_DMA_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +/*#define HAL_EXTI_MODULE_ENABLED */ +/*#define HAL_I2C_MODULE_ENABLED */ +/*#define HAL_I2S_MODULE_ENABLED */ +/*#define HAL_IRDA_MODULE_ENABLED */ +/*#define HAL_IWDG_MODULE_ENABLED */ +#define HAL_PCD_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +/*#define HAL_RTC_MODULE_ENABLED */ +/*#define HAL_SMARTCARD_MODULE_ENABLED */ +/*#define HAL_SMBUS_MODULE_ENABLED */ +/*#define HAL_SPI_MODULE_ENABLED */ +/*#define HAL_TIM_MODULE_ENABLED */ +/*#define HAL_TSC_MODULE_ENABLED */ +#define HAL_UART_MODULE_ENABLED +/*#define HAL_USART_MODULE_ENABLED */ +/*#define HAL_WWDG_MODULE_ENABLED */ + +/* ######################### Oscillator Values adaptation ################### */ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#if !defined (HSE_VALUE) + #define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +/** + * @brief In the following line adjust the External High Speed oscillator (HSE) Startup + * Timeout value + */ +#if !defined (HSE_STARTUP_TIMEOUT) + #define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#if !defined (HSI_VALUE) + #define HSI_VALUE 8000000U /*!< Value of the Internal oscillator in Hz*/ +#endif /* HSI_VALUE */ + +/** + * @brief In the following line adjust the Internal High Speed oscillator (HSI) Startup + * Timeout value + */ +#if !defined (HSI_STARTUP_TIMEOUT) + #define HSI_STARTUP_TIMEOUT 5000U /*!< Time out for HSI start up */ +#endif /* HSI_STARTUP_TIMEOUT */ + +/** + * @brief Internal High Speed oscillator for ADC (HSI14) value. + */ +#if !defined (HSI14_VALUE) + #define HSI14_VALUE 14000000U /*!< Value of the Internal High Speed oscillator for ADC in Hz. + The real value may vary depending on the variations + in voltage and temperature. */ +#endif /* HSI14_VALUE */ + +/** + * @brief Internal High Speed oscillator for USB (HSI48) value. + */ +#if !defined (HSI48_VALUE) + #define HSI48_VALUE 48000000U /*!< Value of the Internal High Speed oscillator for USB in Hz. + The real value may vary depending on the variations + in voltage and temperature. */ +#endif /* HSI48_VALUE */ + +/** + * @brief Internal Low Speed oscillator (LSI) value. + */ +#if !defined (LSI_VALUE) + #define LSI_VALUE 40000U +#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz + The real value may vary depending on the variations + in voltage and temperature. */ +/** + * @brief External Low Speed oscillator (LSE) value. + */ +#if !defined (LSE_VALUE) + #define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */ +#endif /* LSE_VALUE */ + +/** + * @brief Time out for LSE start up value in ms. + */ +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ +#define TICK_INT_PRIORITY ((uint32_t)(1U<<__NVIC_PRIO_BITS) - 1U) /*!< tick interrupt priority (lowest by default) */ + /* Warning: Must be set to higher priority for HAL_Delay() */ + /* and HAL_GetTick() usage under interrupt context */ +#define USE_RTOS 0U +#define PREFETCH_ENABLE 1U +#define INSTRUCTION_CACHE_ENABLE 0U +#define DATA_CACHE_ENABLE 0U +#define USE_SPI_CRC 1U + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ +#define USE_HAL_COMP_REGISTER_CALLBACKS 0U /* COMP register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_TSC_REGISTER_CALLBACKS 0U /* TSC register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ + +/* ########################## Assert Selection ############################## */ +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ + #define USE_FULL_ASSERT 1 + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED + #include "stm32f0xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED + #include "stm32f0xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED + #include "stm32f0xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED + #include "stm32f0xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED + #include "stm32f0xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED + #include "stm32f0xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_CAN_MODULE_ENABLED + #include "stm32f0xx_hal_can.h" +#endif /* HAL_CAN_MODULE_ENABLED */ + +#ifdef HAL_CEC_MODULE_ENABLED + #include "stm32f0xx_hal_cec.h" +#endif /* HAL_CEC_MODULE_ENABLED */ + +#ifdef HAL_COMP_MODULE_ENABLED + #include "stm32f0xx_hal_comp.h" +#endif /* HAL_COMP_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED + #include "stm32f0xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED + #include "stm32f0xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED + #include "stm32f0xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED + #include "stm32f0xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED + #include "stm32f0xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED + #include "stm32f0xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED + #include "stm32f0xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED + #include "stm32f0xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED + #include "stm32f0xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED + #include "stm32f0xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED + #include "stm32f0xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_SMBUS_MODULE_ENABLED + #include "stm32f0xx_hal_smbus.h" +#endif /* HAL_SMBUS_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED + #include "stm32f0xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED + #include "stm32f0xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_TSC_MODULE_ENABLED + #include "stm32f0xx_hal_tsc.h" +#endif /* HAL_TSC_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED + #include "stm32f0xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED + #include "stm32f0xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED + #include "stm32f0xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ + #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ + void assert_failed(uint8_t* file, uint32_t line); +#else + #define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F0xx_HAL_CONF_H */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ + From 2f6f93155372cb282cf1f558cb963a93ef006e21 Mon Sep 17 00:00:00 2001 From: Ned Konz Date: Fri, 19 Mar 2021 12:12:09 -0700 Subject: [PATCH 25/72] Removed asserts --- hw/bsp/stm32f072eval/stm32f072eval.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/hw/bsp/stm32f072eval/stm32f072eval.c b/hw/bsp/stm32f072eval/stm32f072eval.c index ecc78674..e8486d88 100644 --- a/hw/bsp/stm32f072eval/stm32f072eval.c +++ b/hw/bsp/stm32f072eval/stm32f072eval.c @@ -99,9 +99,9 @@ static void SystemClock_Config(void) RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6; RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1; - if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { - assert(false); - } + + HAL_RCC_OscConfig(&RCC_OscInitStruct); + /** Initializes the CPU, AHB and APB buses clocks */ RCC_ClkInitStruct.ClockType = @@ -110,16 +110,13 @@ static void SystemClock_Config(void) RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; - if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) { - assert(false); - } + HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1); + PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USB | RCC_PERIPHCLK_USART2; PeriphClkInit.Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1; PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_HSI48; - if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) { - assert(false); - } + HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit); } From 5e74a7b548e99493a57490d9c6506d908d06b9ba Mon Sep 17 00:00:00 2001 From: Ned Konz Date: Fri, 19 Mar 2021 12:27:44 -0700 Subject: [PATCH 26/72] Fixed case in linker script name --- .../{STM32F072VBTX_FLASH.ld => STM32F072VBTx_FLASH.ld} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename hw/bsp/stm32f072eval/{STM32F072VBTX_FLASH.ld => STM32F072VBTx_FLASH.ld} (100%) diff --git a/hw/bsp/stm32f072eval/STM32F072VBTX_FLASH.ld b/hw/bsp/stm32f072eval/STM32F072VBTx_FLASH.ld similarity index 100% rename from hw/bsp/stm32f072eval/STM32F072VBTX_FLASH.ld rename to hw/bsp/stm32f072eval/STM32F072VBTx_FLASH.ld From a2006ce21466d50e92c62f85a3802262938e3b84 Mon Sep 17 00:00:00 2001 From: Jean Gressmann Date: Sun, 21 Mar 2021 09:38:02 +0100 Subject: [PATCH 27/72] SAM 54 Xplained Pro: remove board specific define --- hw/bsp/same54xplainedpro/board.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/bsp/same54xplainedpro/board.mk b/hw/bsp/same54xplainedpro/board.mk index 1200fd9f..046ebbf6 100644 --- a/hw/bsp/same54xplainedpro/board.mk +++ b/hw/bsp/same54xplainedpro/board.mk @@ -13,7 +13,6 @@ CFLAGS += \ -D__SAME54P20A__ \ -DCONF_CPU_FREQUENCY=$(CONF_CPU_FREQUENCY) \ -DCFG_TUSB_MCU=OPT_MCU_SAME5X \ - -DSAME54XPLAINEDPRO=1 \ -DBOARD_NAME="\"Microchip SAM E54 Xplained Pro\"" From 1a5a1136559aa8a78ec42cd49e3a7c28e55b711c Mon Sep 17 00:00:00 2001 From: Jean Gressmann Date: Sun, 21 Mar 2021 09:43:29 +0100 Subject: [PATCH 28/72] SAM54 Xplained Pro: reduce board setup code for maintenance The board now runs off the internal oscillator at 48 MHz. This is sufficient to run the TinyUSB examples. A better performing clock setup is keep in the file as init_clock_xtal() as an example. --- hw/bsp/same54xplainedpro/board.mk | 2 +- hw/bsp/same54xplainedpro/same54xplainedpro.c | 22 ++++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/hw/bsp/same54xplainedpro/board.mk b/hw/bsp/same54xplainedpro/board.mk index 046ebbf6..89d6ce01 100644 --- a/hw/bsp/same54xplainedpro/board.mk +++ b/hw/bsp/same54xplainedpro/board.mk @@ -1,6 +1,6 @@ DEPS_SUBMODULES = hw/mcu/microchip -CONF_CPU_FREQUENCY ?= 120000000 +CONF_CPU_FREQUENCY ?= 48000000 CFLAGS += \ -mthumb \ diff --git a/hw/bsp/same54xplainedpro/same54xplainedpro.c b/hw/bsp/same54xplainedpro/same54xplainedpro.c index 70ea7d43..52e1b25f 100644 --- a/hw/bsp/same54xplainedpro/same54xplainedpro.c +++ b/hw/bsp/same54xplainedpro/same54xplainedpro.c @@ -59,7 +59,19 @@ void USB_3_Handler(void) #define BUTTON_PIN PIN_PB31 #define BOARD_SERCOM SERCOM2 -static inline void init_clock(void) +/** Initializes the clocks from the external 12 MHz crystal + * + * The goal of this setup is to preserve the second PLL + * for the application code while still having a reasonable + * 48 MHz clock for USB / UART. + * + * GCLK0: CONF_CPU_FREQUENCY (default 120 MHz) from PLL0 + * GCLK1: unused + * GCLK2: 12 MHz from XOSC1 + * DFLL48M: closed loop from GLCK2 + * GCLK3: 48 MHz + */ +static inline void init_clock_xtal(void) { /* configure for a 12MHz crystal connected to XIN1/XOUT1 */ OSCCTRL->XOSCCTRL[1].reg = @@ -118,13 +130,14 @@ static inline void init_clock(void) while(1 == GCLK->SYNCBUSY.bit.GENCTRL3); } +/* Initialize SERCOM2 for 115200 bps 8N1 using a 48 MHz clock */ static inline void uart_init(void) { gpio_set_pin_function(PIN_PB24, PINMUX_PB24D_SERCOM2_PAD1); gpio_set_pin_function(PIN_PB25, PINMUX_PB25D_SERCOM2_PAD0); MCLK->APBBMASK.bit.SERCOM2_ = 1; - GCLK->PCHCTRL[SERCOM2_GCLK_ID_CORE].reg = GCLK_PCHCTRL_GEN_GCLK3 | GCLK_PCHCTRL_CHEN; + GCLK->PCHCTRL[SERCOM2_GCLK_ID_CORE].reg = GCLK_PCHCTRL_GEN_GCLK0 | GCLK_PCHCTRL_CHEN; BOARD_SERCOM->USART.CTRLA.bit.SWRST = 1; /* reset and disable SERCOM -> enable configuration */ while (BOARD_SERCOM->USART.SYNCBUSY.bit.SWRST); @@ -167,7 +180,8 @@ static inline void uart_send_str(const char* text) void board_init(void) { - init_clock(); + // Uncomment this line to run off the XTAL + // init_clock_xtal(); SystemCoreClock = CONF_CPU_FREQUENCY; @@ -218,7 +232,7 @@ void board_init(void) * The USB module requires a GCLK_USB of 48 MHz ~ 0.25% clock * for low speed and full speed operation. */ - hri_gclk_write_PCHCTRL_reg(GCLK, USB_GCLK_ID, GCLK_PCHCTRL_GEN_GCLK3_Val | GCLK_PCHCTRL_CHEN); + hri_gclk_write_PCHCTRL_reg(GCLK, USB_GCLK_ID, GCLK_PCHCTRL_GEN_GCLK0_Val | GCLK_PCHCTRL_CHEN); hri_mclk_set_AHBMASK_USB_bit(MCLK); hri_mclk_set_APBBMASK_USB_bit(MCLK); From 1f9b7b0c4832a2d740bbfe9b437065ea3d24407a Mon Sep 17 00:00:00 2001 From: Jean Gressmann Date: Sun, 21 Mar 2021 09:48:49 +0100 Subject: [PATCH 29/72] SAM54 Xplained Pro: update board setup documentation --- hw/bsp/same54xplainedpro/same54xplainedpro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/bsp/same54xplainedpro/same54xplainedpro.c b/hw/bsp/same54xplainedpro/same54xplainedpro.c index 52e1b25f..4c38fc6e 100644 --- a/hw/bsp/same54xplainedpro/same54xplainedpro.c +++ b/hw/bsp/same54xplainedpro/same54xplainedpro.c @@ -180,7 +180,7 @@ static inline void uart_send_str(const char* text) void board_init(void) { - // Uncomment this line to run off the XTAL + // Uncomment this line and change the GCLK for UART/USB to run off the XTAL. // init_clock_xtal(); SystemCoreClock = CONF_CPU_FREQUENCY; From 567c6d437af06c804baa3cd310021c8cac37aecd Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 23 Mar 2021 15:19:38 +0700 Subject: [PATCH 30/72] remove ses project since it is all broken and occupies space --- .gitignore | 3 + README.md | 2 +- .../device/cdc_msc/ses/cdc_msc_hid.emProject | 13 - .../cdc_msc/ses/lpc11u6x/LPC1100_Startup.s | 145 - .../cdc_msc/ses/lpc11u6x/LPC1100_Target.js | 50 - .../ses/lpc11u6x/LPC11U68_MemoryMap.xml | 7 - .../ses/lpc11u6x/LPC11U6x_Registers.xml | 11919 ------ .../cdc_msc/ses/lpc11u6x/LPC11U6x_Vectors.s | 405 - .../cdc_msc/ses/lpc11u6x/flash_placement.xml | 41 - .../cdc_msc/ses/lpc11u6x/lpc11u6x.emProject | 126 - .../device/cdc_msc/ses/lpc11u6x/thumb_crt0.s | 415 - .../cdc_msc/ses/lpc13xx/LPC1300_Startup.s | 113 - .../cdc_msc/ses/lpc13xx/LPC1300_Target.js | 19 - .../ses/lpc13xx/LPC1347FBD64_MemoryMap.xml | 7 - .../ses/lpc13xx/LPC13Uxx_Registers.xml | 5515 --- .../cdc_msc/ses/lpc13xx/LPC13Uxx_Vectors.s | 342 - .../cdc_msc/ses/lpc13xx/flash_placement.xml | 41 - .../cdc_msc/ses/lpc13xx/lpc13xx.emProject | 119 - .../device/cdc_msc/ses/lpc13xx/thumb_crt0.s | 415 - .../cdc_msc/ses/lpc175x_6x/LPC1700_Startup.s | 109 - .../cdc_msc/ses/lpc175x_6x/LPC1700_Target.js | 19 - .../ses/lpc175x_6x/LPC1769_MemoryMap.xml | 6 - .../ses/lpc175x_6x/LPC176x5x_Registers.xml | 11058 ----- .../ses/lpc175x_6x/LPC176x5x_Vectors.s | 418 - .../ses/lpc175x_6x/flash_placement.xml | 37 - .../ses/lpc175x_6x/lpc175x_6x.emProject | 116 - .../cdc_msc/ses/lpc175x_6x/thumb_crt0.s | 415 - .../cdc_msc/ses/lpc18xx/LPC1800_Startup.s | 110 - .../cdc_msc/ses/lpc18xx/LPC1800_Target.js | 19 - .../cdc_msc/ses/lpc18xx/LPC1857_MemoryMap.xml | 7 - .../cdc_msc/ses/lpc18xx/LPC18xx_Registers.xml | 30452 -------------- .../cdc_msc/ses/lpc18xx/LPC18xx_Vectors.s | 516 - .../cdc_msc/ses/lpc18xx/flash_placement.xml | 37 - .../cdc_msc/ses/lpc18xx/lpc18xx.emProject | 135 - .../device/cdc_msc/ses/lpc18xx/thumb_crt0.s | 415 - .../cdc_msc/ses/lpc40xx/LPC4000_Startup.s | 128 - .../cdc_msc/ses/lpc40xx/LPC4000_Target.js | 19 - .../ses/lpc40xx/LPC4088FBD208_MemoryMap.xml | 6 - .../ses/lpc40xx/LPC408x_7x_Registers.xml | 18992 --------- .../cdc_msc/ses/lpc40xx/LPC408x_7x_Vectors.s | 458 - .../cdc_msc/ses/lpc40xx/flash_placement.xml | 37 - .../cdc_msc/ses/lpc40xx/lpc40xx.emProject | 122 - .../device/cdc_msc/ses/lpc40xx/thumb_crt0.s | 415 - .../cdc_msc/ses/lpc43xx/LPC4300_Startup.s | 126 - .../cdc_msc/ses/lpc43xx/LPC4300_Target.js | 19 - .../lpc43xx/LPC4357 Cortex-M4_MemoryMap.xml | 7 - .../cdc_msc/ses/lpc43xx/LPC43xx_Registers.xml | 33526 ---------------- .../cdc_msc/ses/lpc43xx/LPC43xx_Vectors.s | 540 - .../cdc_msc/ses/lpc43xx/flash_placement.xml | 37 - .../cdc_msc/ses/lpc43xx/lpc43xx.emProject | 136 - .../device/cdc_msc/ses/lpc43xx/thumb_crt0.s | 415 - .../cdc_msc/ses/nrf5x/flash_placement.xml | 37 - .../ses/nrf5x/nRF52840_xxAA_MemoryMap.xml | 5 - .../nrf5x/nRF52840_xxAA_s140v6_MemoryMap.xml | 5 - .../device/cdc_msc/ses/nrf5x/nRF_Target.js | 19 - .../cdc_msc/ses/nrf5x/nrf52840_Registers.xml | 22310 ---------- .../device/cdc_msc/ses/nrf5x/nrf5x.emProject | 132 - .../device/cdc_msc/ses/nrf5x/thumb_crt0.s | 420 - .../ses/samd21/ATSAMD21G18A_MemoryMap.xml | 5 - .../ses/samd21/ATSAMD21G18A_Registers.xml | 9587 ----- .../cdc_msc/ses/samd21/ATSAMD21G18A_Vectors.s | 331 - .../cdc_msc/ses/samd21/SAMD21_Startup.s | 114 - .../cdc_msc/ses/samd21/SAMD21_Target.js | 19 - .../cdc_msc/ses/samd21/flash_placement.xml | 37 - .../cdc_msc/ses/samd21/samd21.emProject | 108 - .../device/cdc_msc/ses/samd21/thumb_crt0.s | 415 - .../ses/samd51/ATSAMD51J19A_MemoryMap.xml | 6 - .../ses/samd51/ATSAMD51J19A_Registers.xml | 23643 ----------- .../cdc_msc/ses/samd51/ATSAMD51J19A_Vectors.s | 1227 - .../cdc_msc/ses/samd51/SAMD51_Startup.s | 128 - .../cdc_msc/ses/samd51/SAMD51_Target.js | 19 - .../cdc_msc/ses/samd51/flash_placement.xml | 37 - .../cdc_msc/ses/samd51/samd51.emProject | 112 - .../device/cdc_msc/ses/samd51/thumb_crt0.s | 415 - .../ses/stm32f4/STM32F407VG_MemoryMap.xml | 6 - .../ses/stm32f4/STM32F40x_Registers.xml | 13923 ------- .../cdc_msc/ses/stm32f4/STM32F40x_Vectors.s | 817 - .../cdc_msc/ses/stm32f4/STM32F4xx_Startup.s | 125 - .../cdc_msc/ses/stm32f4/STM32F4xx_Target.js | 19 - .../cdc_msc/ses/stm32f4/flash_placement.xml | 37 - .../cdc_msc/ses/stm32f4/stm32f4.emProject | 87 - .../device/cdc_msc/ses/stm32f4/thumb_crt0.s | 415 - .../ses/cdc_msc_hid_freertos.emProject | 7 - .../ses/lpc175x_6x/FreeRTOSConfig.h | 134 - .../ses/lpc175x_6x/LPC1700_Startup.s | 109 - .../ses/lpc175x_6x/LPC1700_Target.js | 19 - .../ses/lpc175x_6x/LPC1769_MemoryMap.xml | 6 - .../ses/lpc175x_6x/LPC176x5x_Registers.xml | 11058 ----- .../ses/lpc175x_6x/LPC176x5x_Vectors.s | 418 - .../ses/lpc175x_6x/flash_placement.xml | 37 - .../ses/lpc175x_6x/lpc175x_6x.emProject | 137 - .../ses/lpc175x_6x/thumb_crt0.s | 415 - .../ses/nrf5x/flash_placement.xml | 37 - .../ses/nrf5x/nRF52840_xxAA_MemoryMap.xml | 5 - .../cdc_msc_freertos/ses/nrf5x/nRF_Target.js | 19 - .../ses/nrf5x/nrf52840_Registers.xml | 22310 ---------- .../ses/nrf5x/nrf5x.emProject | 151 - .../cdc_msc_freertos/ses/nrf5x/thumb_crt0.s | 420 - .../ses/samd21/ATSAMD21G18A_MemoryMap.xml | 5 - .../ses/samd21/ATSAMD21G18A_Registers.xml | 9587 ----- .../ses/samd21/ATSAMD21G18A_Vectors.s | 331 - .../ses/samd21/SAMD21_Startup.s | 114 - .../ses/samd21/SAMD21_Target.js | 19 - .../ses/samd21/flash_placement.xml | 37 - .../ses/samd21/samd21.emProject | 142 - .../cdc_msc_freertos/ses/samd21/thumb_crt0.s | 415 - .../ses/samd51/ATSAMD51J19A_MemoryMap.xml | 6 - .../ses/samd51/ATSAMD51J19A_Registers.xml | 23643 ----------- .../ses/samd51/ATSAMD51J19A_Vectors.s | 1227 - .../ses/samd51/SAMD51_Startup.s | 128 - .../ses/samd51/SAMD51_Target.js | 19 - .../ses/samd51/flash_placement.xml | 37 - .../ses/samd51/samd51.emProject | 146 - .../cdc_msc_freertos/ses/samd51/thumb_crt0.s | 415 - .../cdc_msc_hid/ses/cdc_msc_hid.emProject | 9 - .../ses/lpc175x_6x/LPC1700_Startup.s | 109 - .../ses/lpc175x_6x/LPC1700_Target.js | 19 - .../ses/lpc175x_6x/LPC1769_MemoryMap.xml | 6 - .../ses/lpc175x_6x/LPC176x5x_Registers.xml | 11058 ----- .../ses/lpc175x_6x/LPC176x5x_Vectors.s | 418 - .../ses/lpc175x_6x/flash_placement.xml | 37 - .../ses/lpc175x_6x/lpc175x_6x.emProject | 119 - .../cdc_msc_hid/ses/lpc175x_6x/thumb_crt0.s | 415 - .../cdc_msc_hid/ses/lpc18xx/LPC1800_Startup.s | 110 - .../cdc_msc_hid/ses/lpc18xx/LPC1800_Target.js | 19 - .../ses/lpc18xx/LPC1857_MemoryMap.xml | 7 - .../ses/lpc18xx/LPC18xx_Registers.xml | 30452 -------------- .../cdc_msc_hid/ses/lpc18xx/LPC18xx_Vectors.s | 516 - .../ses/lpc18xx/flash_placement.xml | 37 - .../cdc_msc_hid/ses/lpc18xx/lpc18xx.emProject | 139 - .../host/cdc_msc_hid/ses/lpc18xx/thumb_crt0.s | 415 - .../cdc_msc_hid/ses/lpc40xx/LPC4000_Startup.s | 128 - .../cdc_msc_hid/ses/lpc40xx/LPC4000_Target.js | 19 - .../ses/lpc40xx/LPC4088FBD208_MemoryMap.xml | 6 - .../ses/lpc40xx/LPC408x_7x_Registers.xml | 18992 --------- .../ses/lpc40xx/LPC408x_7x_Vectors.s | 458 - .../ses/lpc40xx/flash_placement.xml | 37 - .../cdc_msc_hid/ses/lpc40xx/lpc40xx.emProject | 126 - .../host/cdc_msc_hid/ses/lpc40xx/thumb_crt0.s | 415 - .../cdc_msc_hid/ses/lpc43xx/LPC4300_Startup.s | 126 - .../cdc_msc_hid/ses/lpc43xx/LPC4300_Target.js | 19 - .../lpc43xx/LPC4357 Cortex-M4_MemoryMap.xml | 7 - .../ses/lpc43xx/LPC43xx_Registers.xml | 33526 ---------------- .../cdc_msc_hid/ses/lpc43xx/LPC43xx_Vectors.s | 540 - .../ses/lpc43xx/flash_placement.xml | 37 - .../cdc_msc_hid/ses/lpc43xx/lpc43xx.emProject | 137 - .../host/cdc_msc_hid/ses/lpc43xx/thumb_crt0.s | 415 - 147 files changed, 4 insertions(+), 363531 deletions(-) delete mode 100644 examples/device/cdc_msc/ses/cdc_msc_hid.emProject delete mode 100644 examples/device/cdc_msc/ses/lpc11u6x/LPC1100_Startup.s delete mode 100644 examples/device/cdc_msc/ses/lpc11u6x/LPC1100_Target.js delete mode 100644 examples/device/cdc_msc/ses/lpc11u6x/LPC11U68_MemoryMap.xml delete mode 100644 examples/device/cdc_msc/ses/lpc11u6x/LPC11U6x_Registers.xml delete mode 100644 examples/device/cdc_msc/ses/lpc11u6x/LPC11U6x_Vectors.s delete mode 100644 examples/device/cdc_msc/ses/lpc11u6x/flash_placement.xml delete mode 100644 examples/device/cdc_msc/ses/lpc11u6x/lpc11u6x.emProject delete mode 100644 examples/device/cdc_msc/ses/lpc11u6x/thumb_crt0.s delete mode 100644 examples/device/cdc_msc/ses/lpc13xx/LPC1300_Startup.s delete mode 100644 examples/device/cdc_msc/ses/lpc13xx/LPC1300_Target.js delete mode 100644 examples/device/cdc_msc/ses/lpc13xx/LPC1347FBD64_MemoryMap.xml delete mode 100644 examples/device/cdc_msc/ses/lpc13xx/LPC13Uxx_Registers.xml delete mode 100644 examples/device/cdc_msc/ses/lpc13xx/LPC13Uxx_Vectors.s delete mode 100644 examples/device/cdc_msc/ses/lpc13xx/flash_placement.xml delete mode 100644 examples/device/cdc_msc/ses/lpc13xx/lpc13xx.emProject delete mode 100644 examples/device/cdc_msc/ses/lpc13xx/thumb_crt0.s delete mode 100644 examples/device/cdc_msc/ses/lpc175x_6x/LPC1700_Startup.s delete mode 100644 examples/device/cdc_msc/ses/lpc175x_6x/LPC1700_Target.js delete mode 100644 examples/device/cdc_msc/ses/lpc175x_6x/LPC1769_MemoryMap.xml delete mode 100644 examples/device/cdc_msc/ses/lpc175x_6x/LPC176x5x_Registers.xml delete mode 100644 examples/device/cdc_msc/ses/lpc175x_6x/LPC176x5x_Vectors.s delete mode 100644 examples/device/cdc_msc/ses/lpc175x_6x/flash_placement.xml delete mode 100644 examples/device/cdc_msc/ses/lpc175x_6x/lpc175x_6x.emProject delete mode 100644 examples/device/cdc_msc/ses/lpc175x_6x/thumb_crt0.s delete mode 100644 examples/device/cdc_msc/ses/lpc18xx/LPC1800_Startup.s delete mode 100644 examples/device/cdc_msc/ses/lpc18xx/LPC1800_Target.js delete mode 100644 examples/device/cdc_msc/ses/lpc18xx/LPC1857_MemoryMap.xml delete mode 100644 examples/device/cdc_msc/ses/lpc18xx/LPC18xx_Registers.xml delete mode 100644 examples/device/cdc_msc/ses/lpc18xx/LPC18xx_Vectors.s delete mode 100644 examples/device/cdc_msc/ses/lpc18xx/flash_placement.xml delete mode 100644 examples/device/cdc_msc/ses/lpc18xx/lpc18xx.emProject delete mode 100644 examples/device/cdc_msc/ses/lpc18xx/thumb_crt0.s delete mode 100644 examples/device/cdc_msc/ses/lpc40xx/LPC4000_Startup.s delete mode 100644 examples/device/cdc_msc/ses/lpc40xx/LPC4000_Target.js delete mode 100644 examples/device/cdc_msc/ses/lpc40xx/LPC4088FBD208_MemoryMap.xml delete mode 100644 examples/device/cdc_msc/ses/lpc40xx/LPC408x_7x_Registers.xml delete mode 100644 examples/device/cdc_msc/ses/lpc40xx/LPC408x_7x_Vectors.s delete mode 100644 examples/device/cdc_msc/ses/lpc40xx/flash_placement.xml delete mode 100644 examples/device/cdc_msc/ses/lpc40xx/lpc40xx.emProject delete mode 100644 examples/device/cdc_msc/ses/lpc40xx/thumb_crt0.s delete mode 100644 examples/device/cdc_msc/ses/lpc43xx/LPC4300_Startup.s delete mode 100644 examples/device/cdc_msc/ses/lpc43xx/LPC4300_Target.js delete mode 100644 examples/device/cdc_msc/ses/lpc43xx/LPC4357 Cortex-M4_MemoryMap.xml delete mode 100644 examples/device/cdc_msc/ses/lpc43xx/LPC43xx_Registers.xml delete mode 100644 examples/device/cdc_msc/ses/lpc43xx/LPC43xx_Vectors.s delete mode 100644 examples/device/cdc_msc/ses/lpc43xx/flash_placement.xml delete mode 100644 examples/device/cdc_msc/ses/lpc43xx/lpc43xx.emProject delete mode 100644 examples/device/cdc_msc/ses/lpc43xx/thumb_crt0.s delete mode 100644 examples/device/cdc_msc/ses/nrf5x/flash_placement.xml delete mode 100644 examples/device/cdc_msc/ses/nrf5x/nRF52840_xxAA_MemoryMap.xml delete mode 100644 examples/device/cdc_msc/ses/nrf5x/nRF52840_xxAA_s140v6_MemoryMap.xml delete mode 100644 examples/device/cdc_msc/ses/nrf5x/nRF_Target.js delete mode 100644 examples/device/cdc_msc/ses/nrf5x/nrf52840_Registers.xml delete mode 100644 examples/device/cdc_msc/ses/nrf5x/nrf5x.emProject delete mode 100644 examples/device/cdc_msc/ses/nrf5x/thumb_crt0.s delete mode 100644 examples/device/cdc_msc/ses/samd21/ATSAMD21G18A_MemoryMap.xml delete mode 100644 examples/device/cdc_msc/ses/samd21/ATSAMD21G18A_Registers.xml delete mode 100644 examples/device/cdc_msc/ses/samd21/ATSAMD21G18A_Vectors.s delete mode 100644 examples/device/cdc_msc/ses/samd21/SAMD21_Startup.s delete mode 100644 examples/device/cdc_msc/ses/samd21/SAMD21_Target.js delete mode 100644 examples/device/cdc_msc/ses/samd21/flash_placement.xml delete mode 100644 examples/device/cdc_msc/ses/samd21/samd21.emProject delete mode 100644 examples/device/cdc_msc/ses/samd21/thumb_crt0.s delete mode 100644 examples/device/cdc_msc/ses/samd51/ATSAMD51J19A_MemoryMap.xml delete mode 100644 examples/device/cdc_msc/ses/samd51/ATSAMD51J19A_Registers.xml delete mode 100644 examples/device/cdc_msc/ses/samd51/ATSAMD51J19A_Vectors.s delete mode 100644 examples/device/cdc_msc/ses/samd51/SAMD51_Startup.s delete mode 100644 examples/device/cdc_msc/ses/samd51/SAMD51_Target.js delete mode 100644 examples/device/cdc_msc/ses/samd51/flash_placement.xml delete mode 100644 examples/device/cdc_msc/ses/samd51/samd51.emProject delete mode 100644 examples/device/cdc_msc/ses/samd51/thumb_crt0.s delete mode 100644 examples/device/cdc_msc/ses/stm32f4/STM32F407VG_MemoryMap.xml delete mode 100644 examples/device/cdc_msc/ses/stm32f4/STM32F40x_Registers.xml delete mode 100644 examples/device/cdc_msc/ses/stm32f4/STM32F40x_Vectors.s delete mode 100644 examples/device/cdc_msc/ses/stm32f4/STM32F4xx_Startup.s delete mode 100644 examples/device/cdc_msc/ses/stm32f4/STM32F4xx_Target.js delete mode 100644 examples/device/cdc_msc/ses/stm32f4/flash_placement.xml delete mode 100644 examples/device/cdc_msc/ses/stm32f4/stm32f4.emProject delete mode 100644 examples/device/cdc_msc/ses/stm32f4/thumb_crt0.s delete mode 100644 examples/device/cdc_msc_freertos/ses/cdc_msc_hid_freertos.emProject delete mode 100644 examples/device/cdc_msc_freertos/ses/lpc175x_6x/FreeRTOSConfig.h delete mode 100644 examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC1700_Startup.s delete mode 100644 examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC1700_Target.js delete mode 100644 examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC1769_MemoryMap.xml delete mode 100644 examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC176x5x_Registers.xml delete mode 100644 examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC176x5x_Vectors.s delete mode 100644 examples/device/cdc_msc_freertos/ses/lpc175x_6x/flash_placement.xml delete mode 100644 examples/device/cdc_msc_freertos/ses/lpc175x_6x/lpc175x_6x.emProject delete mode 100644 examples/device/cdc_msc_freertos/ses/lpc175x_6x/thumb_crt0.s delete mode 100644 examples/device/cdc_msc_freertos/ses/nrf5x/flash_placement.xml delete mode 100644 examples/device/cdc_msc_freertos/ses/nrf5x/nRF52840_xxAA_MemoryMap.xml delete mode 100644 examples/device/cdc_msc_freertos/ses/nrf5x/nRF_Target.js delete mode 100644 examples/device/cdc_msc_freertos/ses/nrf5x/nrf52840_Registers.xml delete mode 100644 examples/device/cdc_msc_freertos/ses/nrf5x/nrf5x.emProject delete mode 100644 examples/device/cdc_msc_freertos/ses/nrf5x/thumb_crt0.s delete mode 100644 examples/device/cdc_msc_freertos/ses/samd21/ATSAMD21G18A_MemoryMap.xml delete mode 100644 examples/device/cdc_msc_freertos/ses/samd21/ATSAMD21G18A_Registers.xml delete mode 100644 examples/device/cdc_msc_freertos/ses/samd21/ATSAMD21G18A_Vectors.s delete mode 100644 examples/device/cdc_msc_freertos/ses/samd21/SAMD21_Startup.s delete mode 100644 examples/device/cdc_msc_freertos/ses/samd21/SAMD21_Target.js delete mode 100644 examples/device/cdc_msc_freertos/ses/samd21/flash_placement.xml delete mode 100644 examples/device/cdc_msc_freertos/ses/samd21/samd21.emProject delete mode 100644 examples/device/cdc_msc_freertos/ses/samd21/thumb_crt0.s delete mode 100644 examples/device/cdc_msc_freertos/ses/samd51/ATSAMD51J19A_MemoryMap.xml delete mode 100644 examples/device/cdc_msc_freertos/ses/samd51/ATSAMD51J19A_Registers.xml delete mode 100644 examples/device/cdc_msc_freertos/ses/samd51/ATSAMD51J19A_Vectors.s delete mode 100644 examples/device/cdc_msc_freertos/ses/samd51/SAMD51_Startup.s delete mode 100644 examples/device/cdc_msc_freertos/ses/samd51/SAMD51_Target.js delete mode 100644 examples/device/cdc_msc_freertos/ses/samd51/flash_placement.xml delete mode 100644 examples/device/cdc_msc_freertos/ses/samd51/samd51.emProject delete mode 100644 examples/device/cdc_msc_freertos/ses/samd51/thumb_crt0.s delete mode 100644 examples/host/cdc_msc_hid/ses/cdc_msc_hid.emProject delete mode 100644 examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC1700_Startup.s delete mode 100644 examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC1700_Target.js delete mode 100644 examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC1769_MemoryMap.xml delete mode 100644 examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC176x5x_Registers.xml delete mode 100644 examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC176x5x_Vectors.s delete mode 100644 examples/host/cdc_msc_hid/ses/lpc175x_6x/flash_placement.xml delete mode 100644 examples/host/cdc_msc_hid/ses/lpc175x_6x/lpc175x_6x.emProject delete mode 100644 examples/host/cdc_msc_hid/ses/lpc175x_6x/thumb_crt0.s delete mode 100644 examples/host/cdc_msc_hid/ses/lpc18xx/LPC1800_Startup.s delete mode 100644 examples/host/cdc_msc_hid/ses/lpc18xx/LPC1800_Target.js delete mode 100644 examples/host/cdc_msc_hid/ses/lpc18xx/LPC1857_MemoryMap.xml delete mode 100644 examples/host/cdc_msc_hid/ses/lpc18xx/LPC18xx_Registers.xml delete mode 100644 examples/host/cdc_msc_hid/ses/lpc18xx/LPC18xx_Vectors.s delete mode 100644 examples/host/cdc_msc_hid/ses/lpc18xx/flash_placement.xml delete mode 100644 examples/host/cdc_msc_hid/ses/lpc18xx/lpc18xx.emProject delete mode 100644 examples/host/cdc_msc_hid/ses/lpc18xx/thumb_crt0.s delete mode 100644 examples/host/cdc_msc_hid/ses/lpc40xx/LPC4000_Startup.s delete mode 100644 examples/host/cdc_msc_hid/ses/lpc40xx/LPC4000_Target.js delete mode 100644 examples/host/cdc_msc_hid/ses/lpc40xx/LPC4088FBD208_MemoryMap.xml delete mode 100644 examples/host/cdc_msc_hid/ses/lpc40xx/LPC408x_7x_Registers.xml delete mode 100644 examples/host/cdc_msc_hid/ses/lpc40xx/LPC408x_7x_Vectors.s delete mode 100644 examples/host/cdc_msc_hid/ses/lpc40xx/flash_placement.xml delete mode 100644 examples/host/cdc_msc_hid/ses/lpc40xx/lpc40xx.emProject delete mode 100644 examples/host/cdc_msc_hid/ses/lpc40xx/thumb_crt0.s delete mode 100644 examples/host/cdc_msc_hid/ses/lpc43xx/LPC4300_Startup.s delete mode 100644 examples/host/cdc_msc_hid/ses/lpc43xx/LPC4300_Target.js delete mode 100644 examples/host/cdc_msc_hid/ses/lpc43xx/LPC4357 Cortex-M4_MemoryMap.xml delete mode 100644 examples/host/cdc_msc_hid/ses/lpc43xx/LPC43xx_Registers.xml delete mode 100644 examples/host/cdc_msc_hid/ses/lpc43xx/LPC43xx_Vectors.s delete mode 100644 examples/host/cdc_msc_hid/ses/lpc43xx/flash_placement.xml delete mode 100644 examples/host/cdc_msc_hid/ses/lpc43xx/lpc43xx.emProject delete mode 100644 examples/host/cdc_msc_hid/ses/lpc43xx/thumb_crt0.s diff --git a/.gitignore b/.gitignore index ca43e63e..093bcc57 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,9 @@ latex test_old/ tests_obsolete/ _build +/examples/*/*/ses +/examples/*/*/ozone +/examples/obsolete # coverity intermediate files cov-int # cppcheck build directories diff --git a/README.md b/README.md index f5bd7ced..78ff5f0c 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ TinyUSB is an open-source cross-platform USB Host/Device stack for embedded syst ``` . ├── docs # Documentation -├── examples # Sample with Makefile and Segger Embedded build support +├── examples # Sample with Makefile build support ├── hw │   ├── bsp # Supported boards source files │   └── mcu # Low level mcu core & peripheral drivers diff --git a/examples/device/cdc_msc/ses/cdc_msc_hid.emProject b/examples/device/cdc_msc/ses/cdc_msc_hid.emProject deleted file mode 100644 index c02f7a58..00000000 --- a/examples/device/cdc_msc/ses/cdc_msc_hid.emProject +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc11u6x/LPC1100_Startup.s b/examples/device/cdc_msc/ses/lpc11u6x/LPC1100_Startup.s deleted file mode 100644 index 56918e1b..00000000 --- a/examples/device/cdc_msc/ses/lpc11u6x/LPC1100_Startup.s +++ /dev/null @@ -1,145 +0,0 @@ -/********************************************************************* -* SEGGER Microcontroller GmbH * -* The Embedded Experts * -********************************************************************** -* * -* (c) 2014 - 2018 SEGGER Microcontroller GmbH * -* * -* www.segger.com Support: support@segger.com * -* * -********************************************************************** -* * -* All rights reserved. * -* * -* Redistribution and use in source and binary forms, with or * -* without modification, are permitted provided that the following * -* conditions are met: * -* * -* - Redistributions of source code must retain the above copyright * -* notice, this list of conditions and the following disclaimer. * -* * -* - Neither the name of SEGGER Microcontroller GmbH * -* nor the names of its contributors may be used to endorse or * -* promote products derived from this software without specific * -* prior written permission. * -* * -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -* DISCLAIMED. * -* IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -* DAMAGE. * -* * -*********************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * NO_STACK_INIT * - * * - * If defined, the stack pointer will not be initialised. * - * * - * NO_SYSTEM_INIT * - * * - * If defined, the SystemInit() function will not be called. By default * - * SystemInit() is called after reset to enable the clocks and memories to * - * be initialised prior to any C startup initialisation. * - * * - * NO_VTOR_CONFIG * - * * - * If defined, the vector table offset register will not be configured. * - * * - * MEMORY_INIT * - * * - * If defined, the MemoryInit() function will be called. By default * - * MemoryInit() is called after SystemInit() to enable an external memory * - * controller. * - * * - * STACK_INIT_VAL * - * * - * If defined, specifies the initial stack pointer value. If undefined, * - * the stack pointer will be initialised to point to the end of the * - * RAM segment. * - * * - * VECTORS_IN_RAM * - * * - * If defined, the exception vectors will be copied from Flash to RAM. * - * * - *****************************************************************************/ - - .syntax unified - - .global Reset_Handler - .extern _vectors - - .section .init, "ax" - .thumb_func - - .equ VTOR_REG, 0xE000ED08 - -#ifndef STACK_INIT_VAL -#define STACK_INIT_VAL __RAM_segment_end__ -#endif - -Reset_Handler: -#ifndef NO_STACK_INIT - /* Initialize main stack */ - ldr r0, =STACK_INIT_VAL - ldr r1, =0x7 - bics r0, r1 - mov sp, r0 -#endif - -#ifndef NO_SYSTEM_INIT - /* Initialize system */ - ldr r0, =SystemInit - blx r0 - .pushsection .init_array, "aw", %init_array - .word SystemCoreClockUpdate - .popsection -#endif - -#ifdef MEMORY_INIT - ldr r0, =MemoryInit - blx r0 -#endif - -#ifdef VECTORS_IN_RAM - /* Copy exception vectors into RAM */ - ldr r0, =__vectors_start__ - ldr r1, =__vectors_end__ - ldr r2, =__vectors_ram_start__ -1: - cmp r0, r1 - beq 2f - ldr r3, [r0] - str r3, [r2] - adds r0, r0, #4 - adds r2, r2, #4 - b 1b -2: -#endif - -#ifndef NO_VTOR_CONFIG - /* Configure vector table offset register */ - ldr r0, =VTOR_REG -#ifdef VECTORS_IN_RAM - ldr r1, =_vectors_ram -#else - ldr r1, =_vectors -#endif - str r1, [r0] -#endif - - /* Jump to program start */ - b _start - - diff --git a/examples/device/cdc_msc/ses/lpc11u6x/LPC1100_Target.js b/examples/device/cdc_msc/ses/lpc11u6x/LPC1100_Target.js deleted file mode 100644 index e0ee5776..00000000 --- a/examples/device/cdc_msc/ses/lpc11u6x/LPC1100_Target.js +++ /dev/null @@ -1,50 +0,0 @@ -/********************************************************************* -* SEGGER Microcontroller GmbH * -* The Embedded Experts * -********************************************************************** -* * -* (c) 2014 - 2018 SEGGER Microcontroller GmbH * -* * -* www.segger.com Support: support@segger.com * -* * -********************************************************************** -* * -* All rights reserved. * -* * -* Redistribution and use in source and binary forms, with or * -* without modification, are permitted provided that the following * -* conditions are met: * -* * -* - Redistributions of source code must retain the above copyright * -* notice, this list of conditions and the following disclaimer. * -* * -* - Neither the name of SEGGER Microcontroller GmbH * -* nor the names of its contributors may be used to endorse or * -* promote products derived from this software without specific * -* prior written permission. * -* * -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -* DISCLAIMED. * -* IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -* DAMAGE. * -* * -*********************************************************************/ - -function Reset() { - TargetInterface.resetAndStop(); -} - -function EnableTrace(traceInterfaceType) { - // TODO: Enable trace -} - diff --git a/examples/device/cdc_msc/ses/lpc11u6x/LPC11U68_MemoryMap.xml b/examples/device/cdc_msc/ses/lpc11u6x/LPC11U68_MemoryMap.xml deleted file mode 100644 index 2913af3a..00000000 --- a/examples/device/cdc_msc/ses/lpc11u6x/LPC11U68_MemoryMap.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc11u6x/LPC11U6x_Registers.xml b/examples/device/cdc_msc/ses/lpc11u6x/LPC11U6x_Registers.xml deleted file mode 100644 index f1f465ea..00000000 --- a/examples/device/cdc_msc/ses/lpc11u6x/LPC11U6x_Registers.xml +++ /dev/null @@ -1,11919 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc11u6x/LPC11U6x_Vectors.s b/examples/device/cdc_msc/ses/lpc11u6x/LPC11U6x_Vectors.s deleted file mode 100644 index 4d661df3..00000000 --- a/examples/device/cdc_msc/ses/lpc11u6x/LPC11U6x_Vectors.s +++ /dev/null @@ -1,405 +0,0 @@ -/********************************************************************* -* SEGGER Microcontroller GmbH * -* The Embedded Experts * -********************************************************************** -* * -* (c) 2014 - 2018 SEGGER Microcontroller GmbH * -* * -* www.segger.com Support: support@segger.com * -* * -********************************************************************** -* * -* All rights reserved. * -* * -* Redistribution and use in source and binary forms, with or * -* without modification, are permitted provided that the following * -* conditions are met: * -* * -* - Redistributions of source code must retain the above copyright * -* notice, this list of conditions and the following disclaimer. * -* * -* - Neither the name of SEGGER Microcontroller GmbH * -* nor the names of its contributors may be used to endorse or * -* promote products derived from this software without specific * -* prior written permission. * -* * -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -* DISCLAIMED. * -* IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -* DAMAGE. * -* * -*********************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * VECTORS_IN_RAM * - * * - * If defined, an area of RAM will large enough to store the vector table * - * will be reserved. * - * * - *****************************************************************************/ - - .syntax unified - .code 16 - - .section .init, "ax" - .align 2 - -/***************************************************************************** - * Default Exception Handlers * - *****************************************************************************/ - - .thumb_func - .weak NMI_Handler -NMI_Handler: - b . - - .thumb_func - .weak HardFault_Handler -HardFault_Handler: - b . - - .thumb_func - .weak SVC_Handler -SVC_Handler: - b . - - .thumb_func - .weak PendSV_Handler -PendSV_Handler: - b . - - .thumb_func - .weak SysTick_Handler -SysTick_Handler: - b . - - .thumb_func -Dummy_Handler: - b . - -#if defined(__OPTIMIZATION_SMALL) - - .weak PIN_INT0_IRQHandler - .thumb_set PIN_INT0_IRQHandler,Dummy_Handler - - .weak PIN_INT1_IRQHandler - .thumb_set PIN_INT1_IRQHandler,Dummy_Handler - - .weak PIN_INT2_IRQHandler - .thumb_set PIN_INT2_IRQHandler,Dummy_Handler - - .weak PIN_INT3_IRQHandler - .thumb_set PIN_INT3_IRQHandler,Dummy_Handler - - .weak PIN_INT4_IRQHandler - .thumb_set PIN_INT4_IRQHandler,Dummy_Handler - - .weak PIN_INT5_IRQHandler - .thumb_set PIN_INT5_IRQHandler,Dummy_Handler - - .weak PIN_INT6_IRQHandler - .thumb_set PIN_INT6_IRQHandler,Dummy_Handler - - .weak PIN_INT7_IRQHandler - .thumb_set PIN_INT7_IRQHandler,Dummy_Handler - - .weak GINT0_IRQHandler - .thumb_set GINT0_IRQHandler,Dummy_Handler - - .weak GINT1_IRQHandler - .thumb_set GINT1_IRQHandler,Dummy_Handler - - .weak I2C1_IRQHandler - .thumb_set I2C1_IRQHandler,Dummy_Handler - - .weak USART1_4_IRQHandler - .thumb_set USART1_4_IRQHandler,Dummy_Handler - - .weak USART2_3_IRQHandler - .thumb_set USART2_3_IRQHandler,Dummy_Handler - - .weak SCT0_1_IRQHandler - .thumb_set SCT0_1_IRQHandler,Dummy_Handler - - .weak SSP1_IRQHandler - .thumb_set SSP1_IRQHandler,Dummy_Handler - - .weak I2C0_IRQHandler - .thumb_set I2C0_IRQHandler,Dummy_Handler - - .weak CT16B0_IRQHandler - .thumb_set CT16B0_IRQHandler,Dummy_Handler - - .weak CT16B1_IRQHandler - .thumb_set CT16B1_IRQHandler,Dummy_Handler - - .weak CT32B0_IRQHandler - .thumb_set CT32B0_IRQHandler,Dummy_Handler - - .weak CT32B1_IRQHandler - .thumb_set CT32B1_IRQHandler,Dummy_Handler - - .weak SSP0_IRQHandler - .thumb_set SSP0_IRQHandler,Dummy_Handler - - .weak USART_IRQHandler - .thumb_set USART_IRQHandler,Dummy_Handler - - .weak USB_IRQHandler - .thumb_set USB_IRQHandler,Dummy_Handler - - .weak USB_FIQ_IRQHandler - .thumb_set USB_FIQ_IRQHandler,Dummy_Handler - - .weak ADC_A_IRQHandler - .thumb_set ADC_A_IRQHandler,Dummy_Handler - - .weak RTC_IRQHandler - .thumb_set RTC_IRQHandler,Dummy_Handler - - .weak BOD_WDT_IRQHandler - .thumb_set BOD_WDT_IRQHandler,Dummy_Handler - - .weak FLASH_IRQHandler - .thumb_set FLASH_IRQHandler,Dummy_Handler - - .weak DMA_IRQHandler - .thumb_set DMA_IRQHandler,Dummy_Handler - - .weak USBWAKEUP_IRQHandler - .thumb_set USBWAKEUP_IRQHandler,Dummy_Handler - -#else - - .thumb_func - .weak PIN_INT0_IRQHandler -PIN_INT0_IRQHandler: - b . - - .thumb_func - .weak PIN_INT1_IRQHandler -PIN_INT1_IRQHandler: - b . - - .thumb_func - .weak PIN_INT2_IRQHandler -PIN_INT2_IRQHandler: - b . - - .thumb_func - .weak PIN_INT3_IRQHandler -PIN_INT3_IRQHandler: - b . - - .thumb_func - .weak PIN_INT4_IRQHandler -PIN_INT4_IRQHandler: - b . - - .thumb_func - .weak PIN_INT5_IRQHandler -PIN_INT5_IRQHandler: - b . - - .thumb_func - .weak PIN_INT6_IRQHandler -PIN_INT6_IRQHandler: - b . - - .thumb_func - .weak PIN_INT7_IRQHandler -PIN_INT7_IRQHandler: - b . - - .thumb_func - .weak GINT0_IRQHandler -GINT0_IRQHandler: - b . - - .thumb_func - .weak GINT1_IRQHandler -GINT1_IRQHandler: - b . - - .thumb_func - .weak I2C1_IRQHandler -I2C1_IRQHandler: - b . - - .thumb_func - .weak USART1_4_IRQHandler -USART1_4_IRQHandler: - b . - - .thumb_func - .weak USART2_3_IRQHandler -USART2_3_IRQHandler: - b . - - .thumb_func - .weak SCT0_1_IRQHandler -SCT0_1_IRQHandler: - b . - - .thumb_func - .weak SSP1_IRQHandler -SSP1_IRQHandler: - b . - - .thumb_func - .weak I2C0_IRQHandler -I2C0_IRQHandler: - b . - - .thumb_func - .weak CT16B0_IRQHandler -CT16B0_IRQHandler: - b . - - .thumb_func - .weak CT16B1_IRQHandler -CT16B1_IRQHandler: - b . - - .thumb_func - .weak CT32B0_IRQHandler -CT32B0_IRQHandler: - b . - - .thumb_func - .weak CT32B1_IRQHandler -CT32B1_IRQHandler: - b . - - .thumb_func - .weak SSP0_IRQHandler -SSP0_IRQHandler: - b . - - .thumb_func - .weak USART_IRQHandler -USART_IRQHandler: - b . - - .thumb_func - .weak USB_IRQHandler -USB_IRQHandler: - b . - - .thumb_func - .weak USB_FIQ_IRQHandler -USB_FIQ_IRQHandler: - b . - - .thumb_func - .weak ADC_A_IRQHandler -ADC_A_IRQHandler: - b . - - .thumb_func - .weak RTC_IRQHandler -RTC_IRQHandler: - b . - - .thumb_func - .weak BOD_WDT_IRQHandler -BOD_WDT_IRQHandler: - b . - - .thumb_func - .weak FLASH_IRQHandler -FLASH_IRQHandler: - b . - - .thumb_func - .weak DMA_IRQHandler -DMA_IRQHandler: - b . - - .thumb_func - .weak USBWAKEUP_IRQHandler -USBWAKEUP_IRQHandler: - b . - -#endif - -/***************************************************************************** - * Vector Table * - *****************************************************************************/ - - .section .vectors, "ax" - .align 2 - .global _vectors - .extern __stack_end__ - .extern Reset_Handler - -_vectors: - .word __stack_end__ - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word SVC_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word PendSV_Handler - .word SysTick_Handler - .word PIN_INT0_IRQHandler - .word PIN_INT1_IRQHandler - .word PIN_INT2_IRQHandler - .word PIN_INT3_IRQHandler - .word PIN_INT4_IRQHandler - .word PIN_INT5_IRQHandler - .word PIN_INT6_IRQHandler - .word PIN_INT7_IRQHandler - .word GINT0_IRQHandler - .word GINT1_IRQHandler - .word I2C1_IRQHandler - .word USART1_4_IRQHandler - .word USART2_3_IRQHandler - .word SCT0_1_IRQHandler - .word SSP1_IRQHandler - .word I2C0_IRQHandler - .word CT16B0_IRQHandler - .word CT16B1_IRQHandler - .word CT32B0_IRQHandler - .word CT32B1_IRQHandler - .word SSP0_IRQHandler - .word USART_IRQHandler - .word USB_IRQHandler - .word USB_FIQ_IRQHandler - .word ADC_A_IRQHandler - .word RTC_IRQHandler - .word BOD_WDT_IRQHandler - .word FLASH_IRQHandler - .word DMA_IRQHandler - .word Dummy_Handler /* Reserved */ - .word USBWAKEUP_IRQHandler -_vectors_end: - -#ifdef VECTORS_IN_RAM - .section .vectors_ram, "ax" - .align 2 - .global _vectors_ram - -_vectors_ram: - .space _vectors_end - _vectors, 0 -#endif diff --git a/examples/device/cdc_msc/ses/lpc11u6x/flash_placement.xml b/examples/device/cdc_msc/ses/lpc11u6x/flash_placement.xml deleted file mode 100644 index 27a63d5b..00000000 --- a/examples/device/cdc_msc/ses/lpc11u6x/flash_placement.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc11u6x/lpc11u6x.emProject b/examples/device/cdc_msc/ses/lpc11u6x/lpc11u6x.emProject deleted file mode 100644 index ea47e0db..00000000 --- a/examples/device/cdc_msc/ses/lpc11u6x/lpc11u6x.emProject +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc11u6x/thumb_crt0.s b/examples/device/cdc_msc/ses/lpc11u6x/thumb_crt0.s deleted file mode 100644 index 17f88e0c..00000000 --- a/examples/device/cdc_msc/ses/lpc11u6x/thumb_crt0.s +++ /dev/null @@ -1,415 +0,0 @@ -// ********************************************************************** -// * SEGGER Microcontroller GmbH * -// * The Embedded Experts * -// ********************************************************************** -// * * -// * (c) 2014 - 2018 SEGGER Microcontroller GmbH * -// * (c) 2001 - 2018 Rowley Associates Limited * -// * * -// * www.segger.com Support: support@segger.com * -// * * -// ********************************************************************** -// * * -// * All rights reserved. * -// * * -// * Redistribution and use in source and binary forms, with or * -// * without modification, are permitted provided that the following * -// * conditions are met: * -// * * -// * - Redistributions of source code must retain the above copyright * -// * notice, this list of conditions and the following disclaimer. * -// * * -// * - Neither the name of SEGGER Microcontroller GmbH * -// * nor the names of its contributors may be used to endorse or * -// * promote products derived from this software without specific * -// * prior written permission. * -// * * -// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -// * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -// * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -// * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -// * DISCLAIMED. * -// * IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -// * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -// * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -// * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -// * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -// * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -// * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -// * DAMAGE. * -// * * -// ********************************************************************** -// -// -// Preprocessor Definitions -// ------------------------ -// APP_ENTRY_POINT -// -// Defines the application entry point function, if undefined this setting -// defaults to "main". -// -// INITIALIZE_STACK -// -// If defined, the contents of the stack will be initialized to a the -// value 0xCC. -// -// INITIALIZE_SECONDARY_SECTIONS -// -// If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized. -// -// INITIALIZE_TCM_SECTIONS -// -// If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections -// will be initialized. -// -// INITIALIZE_USER_SECTIONS -// -// If defined, the function InitializeUserMemorySections will be called prior -// to entering main in order to allow the user to initialize any user defined -// memory sections. -// -// FULL_LIBRARY -// -// If defined then -// - argc, argv are setup by the debug_getargs. -// - the exit symbol is defined and executes on return from main. -// - the exit symbol calls destructors, atexit functions and then debug_exit. -// -// If not defined then -// - argc and argv are zero. -// - the exit symbol is defined, executes on return from main and loops -// - -#ifndef APP_ENTRY_POINT -#define APP_ENTRY_POINT main -#endif - -#ifndef ARGSSPACE -#define ARGSSPACE 128 -#endif - .syntax unified - - .global _start - .extern APP_ENTRY_POINT - .global exit - .weak exit - -#ifdef INITIALIZE_USER_SECTIONS - .extern InitializeUserMemorySections -#endif - - .section .init, "ax" - .code 16 - .balign 2 - .thumb_func - -_start: - /* Set up main stack if size > 0 */ - ldr r1, =__stack_end__ - ldr r0, =__stack_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - mov sp, r1 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - ldr r0, =__stack_start__ - bl memory_set -#endif -1: - - /* Set up process stack if size > 0 */ - ldr r1, =__stack_process_end__ - ldr r0, =__stack_process_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - msr psp, r1 - movs r2, #2 - msr control, r2 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - bl memory_set -#endif -1: - - /* Copy initialized memory sections into RAM (if necessary). */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl memory_copy - ldr r0, =__tdata_load_start__ - ldr r1, =__tdata_start__ - ldr r2, =__tdata_end__ - bl memory_copy -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__data2_load_start__ - ldr r1, =__data2_start__ - ldr r2, =__data2_end__ - bl memory_copy - ldr r0, =__text2_load_start__ - ldr r1, =__text2_start__ - ldr r2, =__text2_end__ - bl memory_copy - ldr r0, =__rodata2_load_start__ - ldr r1, =__rodata2_start__ - ldr r2, =__rodata2_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__data_tcm_load_start__ - ldr r1, =__data_tcm_start__ - ldr r2, =__data_tcm_end__ - bl memory_copy - ldr r0, =__text_tcm_load_start__ - ldr r1, =__text_tcm_start__ - ldr r2, =__text_tcm_end__ - bl memory_copy - ldr r0, =__rodata_tcm_load_start__ - ldr r1, =__rodata_tcm_start__ - ldr r2, =__rodata_tcm_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Zero the bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - movs r2, #0 - bl memory_set - ldr r0, =__tbss_start__ - ldr r1, =__tbss_end__ - movs r2, #0 - bl memory_set -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__bss2_start__ - ldr r1, =__bss2_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__bss_tcm_start__ - ldr r1, =__bss_tcm_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Initialize the heap */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - subs r1, r1, r0 - cmp r1, #8 - blt 1f - movs r2, #0 - str r2, [r0] - adds r0, r0, #4 - str r1, [r0] -1: - -#ifdef INITIALIZE_USER_SECTIONS - ldr r2, =InitializeUserMemorySections - blx r2 -#endif - - /* Call constructors */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -ctor_loop: - cmp r0, r1 - beq ctor_end - ldr r2, [r0] - adds r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b ctor_loop -ctor_end: - - /* Setup initial call frame */ - movs r0, #0 - mov lr, r0 - mov r12, sp - - .type start, function -start: - /* Jump to application entry point */ -#ifdef FULL_LIBRARY - movs r0, #ARGSSPACE - ldr r1, =args - ldr r2, =debug_getargs - blx r2 - ldr r1, =args -#else - movs r0, #0 - movs r1, #0 -#endif - ldr r2, =APP_ENTRY_POINT - blx r2 - - .thumb_func -exit: -#ifdef FULL_LIBRARY - mov r5, r0 // save the exit parameter/return result - - /* Call destructors */ - ldr r0, =__dtors_start__ - ldr r1, =__dtors_end__ -dtor_loop: - cmp r0, r1 - beq dtor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b dtor_loop -dtor_end: - - /* Call atexit functions */ - ldr r2, =_execute_at_exit_fns - blx r2 - - /* Call debug_exit with return result/exit parameter */ - mov r0, r5 - ldr r2, =debug_exit - blx r2 -#endif - - /* Returned from application entry point, loop forever. */ -exit_loop: - b exit_loop - - .thumb_func -memory_copy: - cmp r0, r1 - beq 2f - subs r2, r2, r1 - beq 2f -1: - ldrb r3, [r0] - adds r0, r0, #1 - strb r3, [r1] - adds r1, r1, #1 - subs r2, r2, #1 - bne 1b -2: - bx lr - - .thumb_func -memory_set: - cmp r0, r1 - beq 1f - strb r2, [r0] - adds r0, r0, #1 - b memory_set -1: - bx lr - - // default C/C++ library helpers - -.macro HELPER helper_name - .section .text.\helper_name, "ax", %progbits - .balign 2 - .global \helper_name - .weak \helper_name -\helper_name: - .thumb_func -.endm - -.macro JUMPTO name -#if defined(__thumb__) && !defined(__thumb2__) - mov r12, r0 - ldr r0, =\name - push {r0} - mov r0, r12 - pop {pc} -#else - b \name -#endif -.endm - -HELPER __aeabi_read_tp - ldr r0, =__tbss_start__-8 - bx lr -HELPER abort - b . -HELPER __assert - b . -HELPER __aeabi_assert - b . -HELPER __sync_synchronize - bx lr -HELPER __getchar - JUMPTO debug_getchar -HELPER __putchar - JUMPTO debug_putchar -HELPER __open - JUMPTO debug_fopen -HELPER __close - JUMPTO debug_fclose -HELPER __write - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fwrite -HELPER __read - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fread -HELPER __seek - push {r4, lr} - mov r4, r0 - bl debug_fseek - cmp r0, #0 - bne 1f - mov r0, r4 - bl debug_ftell - pop {r4, pc} -1: - ldr r0, =-1 - pop {r4, pc} - // char __user_locale_name_buffer[]; - .section .bss.__user_locale_name_buffer, "aw", %nobits - .global __user_locale_name_buffer - .weak __user_locale_name_buffer - __user_locale_name_buffer: - .word 0x0 - -#ifdef FULL_LIBRARY - .bss -args: - .space ARGSSPACE -#endif - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - diff --git a/examples/device/cdc_msc/ses/lpc13xx/LPC1300_Startup.s b/examples/device/cdc_msc/ses/lpc13xx/LPC1300_Startup.s deleted file mode 100644 index ad41afb9..00000000 --- a/examples/device/cdc_msc/ses/lpc13xx/LPC1300_Startup.s +++ /dev/null @@ -1,113 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * NO_STACK_INIT * - * * - * If defined, the stack pointer will not be initialised. * - * * - * NO_SYSTEM_INIT * - * * - * If defined, the SystemInit() function will not be called. By default * - * SystemInit() is called after reset to enable the clocks and memories to * - * be initialised prior to any C startup initialisation. * - * * - * NO_VTOR_CONFIG * - * * - * If defined, the vector table offset register will not be configured. * - * * - * MEMORY_INIT * - * * - * If defined, the MemoryInit() function will be called. By default * - * MemoryInit() is called after SystemInit() to enable an external memory * - * controller. * - * * - * STACK_INIT_VAL * - * * - * If defined, specifies the initial stack pointer value. If undefined, * - * the stack pointer will be initialised to point to the end of the * - * RAM segment. * - * * - * VECTORS_IN_RAM * - * * - * If defined, the exception vectors will be copied from Flash to RAM. * - * * - *****************************************************************************/ - - .syntax unified - - .global Reset_Handler - .extern _vectors - - .section .init, "ax" - .thumb_func - - .equ VTOR_REG, 0xE000ED08 - -#ifndef STACK_INIT_VAL -#define STACK_INIT_VAL __RAM_segment_end__ -#endif - -Reset_Handler: -#ifndef NO_STACK_INIT - /* Initialise main stack */ - ldr r0, =STACK_INIT_VAL - bic r0, #0x7 - mov sp, r0 -#endif - -#ifndef NO_SYSTEM_INIT - /* Initialise system */ - ldr r0, =SystemInit - blx r0 - .pushsection .init_array, "aw", %init_array - .word SystemCoreClockUpdate - .popsection -#endif - -#ifdef MEMORY_INIT - ldr r0, =MemoryInit - blx r0 -#endif - -#ifdef VECTORS_IN_RAM - /* Copy exception vectors into RAM */ - ldr r0, =__vectors_start__ - ldr r1, =__vectors_end__ - ldr r2, =__vectors_ram_start__ -1: - cmp r0, r1 - beq 2f - ldr r3, [r0] - str r3, [r2] - adds r0, r0, #4 - adds r2, r2, #4 - b 1b -2: -#endif - -#ifndef NO_VTOR_CONFIG - /* Configure vector table offset register */ - ldr r0, =VTOR_REG -#ifdef VECTORS_IN_RAM - ldr r1, =_vectors_ram -#else - ldr r1, =_vectors -#endif - str r1, [r0] -#endif - - /* Jump to program start */ - b _start - - diff --git a/examples/device/cdc_msc/ses/lpc13xx/LPC1300_Target.js b/examples/device/cdc_msc/ses/lpc13xx/LPC1300_Target.js deleted file mode 100644 index 20560af4..00000000 --- a/examples/device/cdc_msc/ses/lpc13xx/LPC1300_Target.js +++ /dev/null @@ -1,19 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -function Reset() { - TargetInterface.resetAndStop(); -} - -function EnableTrace(traceInterfaceType) { - // TODO: Enable trace -} - diff --git a/examples/device/cdc_msc/ses/lpc13xx/LPC1347FBD64_MemoryMap.xml b/examples/device/cdc_msc/ses/lpc13xx/LPC1347FBD64_MemoryMap.xml deleted file mode 100644 index 29864528..00000000 --- a/examples/device/cdc_msc/ses/lpc13xx/LPC1347FBD64_MemoryMap.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc13xx/LPC13Uxx_Registers.xml b/examples/device/cdc_msc/ses/lpc13xx/LPC13Uxx_Registers.xml deleted file mode 100644 index 0f605ce0..00000000 --- a/examples/device/cdc_msc/ses/lpc13xx/LPC13Uxx_Registers.xml +++ /dev/null @@ -1,5515 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc13xx/LPC13Uxx_Vectors.s b/examples/device/cdc_msc/ses/lpc13xx/LPC13Uxx_Vectors.s deleted file mode 100644 index 1cbd4bb2..00000000 --- a/examples/device/cdc_msc/ses/lpc13xx/LPC13Uxx_Vectors.s +++ /dev/null @@ -1,342 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * VECTORS_IN_RAM * - * * - * If defined, an area of RAM will large enough to store the vector table * - * will be reserved. * - * * - *****************************************************************************/ - - .syntax unified - .code 16 - - .section .init, "ax" - .align 0 - -/***************************************************************************** - * Default Exception Handlers * - *****************************************************************************/ - - .thumb_func - .weak NMI_Handler -NMI_Handler: - b . - - .thumb_func - .weak HardFault_Handler -HardFault_Handler: - b . - - .thumb_func - .weak SVC_Handler -SVC_Handler: - b . - - .thumb_func - .weak PendSV_Handler -PendSV_Handler: - b . - - .thumb_func - .weak SysTick_Handler -SysTick_Handler: - b . - - .thumb_func -Dummy_Handler: - b . - -#if defined(__OPTIMIZATION_SMALL) - - .weak PIN_INT0_IRQHandler - .thumb_set PIN_INT0_IRQHandler,Dummy_Handler - - .weak PIN_INT1_IRQHandler - .thumb_set PIN_INT1_IRQHandler,Dummy_Handler - - .weak PIN_INT2_IRQHandler - .thumb_set PIN_INT2_IRQHandler,Dummy_Handler - - .weak PIN_INT3_IRQHandler - .thumb_set PIN_INT3_IRQHandler,Dummy_Handler - - .weak PIN_INT4_IRQHandler - .thumb_set PIN_INT4_IRQHandler,Dummy_Handler - - .weak PIN_INT5_IRQHandler - .thumb_set PIN_INT5_IRQHandler,Dummy_Handler - - .weak PIN_INT6_IRQHandler - .thumb_set PIN_INT6_IRQHandler,Dummy_Handler - - .weak PIN_INT7_IRQHandler - .thumb_set PIN_INT7_IRQHandler,Dummy_Handler - - .weak GINT0_IRQHandler - .thumb_set GINT0_IRQHandler,Dummy_Handler - - .weak GINT1_IRQHandler - .thumb_set GINT1_IRQHandler,Dummy_Handler - - .weak RIT_IRQHandler - .thumb_set RIT_IRQHandler,Dummy_Handler - - .weak SSP1_IRQHandler - .thumb_set SSP1_IRQHandler,Dummy_Handler - - .weak I2C_IRQHandler - .thumb_set I2C_IRQHandler,Dummy_Handler - - .weak CT16B0_IRQHandler - .thumb_set CT16B0_IRQHandler,Dummy_Handler - - .weak CT16B1_IRQHandler - .thumb_set CT16B1_IRQHandler,Dummy_Handler - - .weak CT32B0_IRQHandler - .thumb_set CT32B0_IRQHandler,Dummy_Handler - - .weak CT32B1_IRQHandler - .thumb_set CT32B1_IRQHandler,Dummy_Handler - - .weak SSP0_IRQHandler - .thumb_set SSP0_IRQHandler,Dummy_Handler - - .weak USART_IRQHandler - .thumb_set USART_IRQHandler,Dummy_Handler - - .weak USB_IRQHandler - .thumb_set USB_IRQHandler,Dummy_Handler - - .weak USB_FIQ_IRQHandler - .thumb_set USB_FIQ_IRQHandler,Dummy_Handler - - .weak ADC_IRQHandler - .thumb_set ADC_IRQHandler,Dummy_Handler - - .weak WWDT_IRQHandler - .thumb_set WWDT_IRQHandler,Dummy_Handler - - .weak BOD_IRQHandler - .thumb_set BOD_IRQHandler,Dummy_Handler - - .weak FLASH_IRQHandler - .thumb_set FLASH_IRQHandler,Dummy_Handler - - .weak USBWAKEUP_IRQHandler - .thumb_set USBWAKEUP_IRQHandler,Dummy_Handler - -#else - - .thumb_func - .weak PIN_INT0_IRQHandler -PIN_INT0_IRQHandler: - b . - - .thumb_func - .weak PIN_INT1_IRQHandler -PIN_INT1_IRQHandler: - b . - - .thumb_func - .weak PIN_INT2_IRQHandler -PIN_INT2_IRQHandler: - b . - - .thumb_func - .weak PIN_INT3_IRQHandler -PIN_INT3_IRQHandler: - b . - - .thumb_func - .weak PIN_INT4_IRQHandler -PIN_INT4_IRQHandler: - b . - - .thumb_func - .weak PIN_INT5_IRQHandler -PIN_INT5_IRQHandler: - b . - - .thumb_func - .weak PIN_INT6_IRQHandler -PIN_INT6_IRQHandler: - b . - - .thumb_func - .weak PIN_INT7_IRQHandler -PIN_INT7_IRQHandler: - b . - - .thumb_func - .weak GINT0_IRQHandler -GINT0_IRQHandler: - b . - - .thumb_func - .weak GINT1_IRQHandler -GINT1_IRQHandler: - b . - - .thumb_func - .weak RIT_IRQHandler -RIT_IRQHandler: - b . - - .thumb_func - .weak SSP1_IRQHandler -SSP1_IRQHandler: - b . - - .thumb_func - .weak I2C_IRQHandler -I2C_IRQHandler: - b . - - .thumb_func - .weak CT16B0_IRQHandler -CT16B0_IRQHandler: - b . - - .thumb_func - .weak CT16B1_IRQHandler -CT16B1_IRQHandler: - b . - - .thumb_func - .weak CT32B0_IRQHandler -CT32B0_IRQHandler: - b . - - .thumb_func - .weak CT32B1_IRQHandler -CT32B1_IRQHandler: - b . - - .thumb_func - .weak SSP0_IRQHandler -SSP0_IRQHandler: - b . - - .thumb_func - .weak USART_IRQHandler -USART_IRQHandler: - b . - - .thumb_func - .weak USB_IRQHandler -USB_IRQHandler: - b . - - .thumb_func - .weak USB_FIQ_IRQHandler -USB_FIQ_IRQHandler: - b . - - .thumb_func - .weak ADC_IRQHandler -ADC_IRQHandler: - b . - - .thumb_func - .weak WWDT_IRQHandler -WWDT_IRQHandler: - b . - - .thumb_func - .weak BOD_IRQHandler -BOD_IRQHandler: - b . - - .thumb_func - .weak FLASH_IRQHandler -FLASH_IRQHandler: - b . - - .thumb_func - .weak USBWAKEUP_IRQHandler -USBWAKEUP_IRQHandler: - b . - -#endif - -/***************************************************************************** - * Vector Table * - *****************************************************************************/ - - .section .vectors, "ax" - .align 0 - .global _vectors - .extern __stack_end__ - .extern Reset_Handler - -_vectors: - .word __stack_end__ - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word SVC_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word PendSV_Handler - .word SysTick_Handler - .word PIN_INT0_IRQHandler - .word PIN_INT1_IRQHandler - .word PIN_INT2_IRQHandler - .word PIN_INT3_IRQHandler - .word PIN_INT4_IRQHandler - .word PIN_INT5_IRQHandler - .word PIN_INT6_IRQHandler - .word PIN_INT7_IRQHandler - .word GINT0_IRQHandler - .word GINT1_IRQHandler - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word RIT_IRQHandler - .word Dummy_Handler /* Reserved */ - .word SSP1_IRQHandler - .word I2C_IRQHandler - .word CT16B0_IRQHandler - .word CT16B1_IRQHandler - .word CT32B0_IRQHandler - .word CT32B1_IRQHandler - .word SSP0_IRQHandler - .word USART_IRQHandler - .word USB_IRQHandler - .word USB_FIQ_IRQHandler - .word ADC_IRQHandler - .word WWDT_IRQHandler - .word BOD_IRQHandler - .word FLASH_IRQHandler - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word USBWAKEUP_IRQHandler -_vectors_end: - -#ifdef VECTORS_IN_RAM - .section .vectors_ram, "ax" - .align 0 - .global _vectors_ram - -_vectors_ram: - .space _vectors_end - _vectors, 0 -#endif diff --git a/examples/device/cdc_msc/ses/lpc13xx/flash_placement.xml b/examples/device/cdc_msc/ses/lpc13xx/flash_placement.xml deleted file mode 100644 index 27a63d5b..00000000 --- a/examples/device/cdc_msc/ses/lpc13xx/flash_placement.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc13xx/lpc13xx.emProject b/examples/device/cdc_msc/ses/lpc13xx/lpc13xx.emProject deleted file mode 100644 index f25307dd..00000000 --- a/examples/device/cdc_msc/ses/lpc13xx/lpc13xx.emProject +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc13xx/thumb_crt0.s b/examples/device/cdc_msc/ses/lpc13xx/thumb_crt0.s deleted file mode 100644 index 17f88e0c..00000000 --- a/examples/device/cdc_msc/ses/lpc13xx/thumb_crt0.s +++ /dev/null @@ -1,415 +0,0 @@ -// ********************************************************************** -// * SEGGER Microcontroller GmbH * -// * The Embedded Experts * -// ********************************************************************** -// * * -// * (c) 2014 - 2018 SEGGER Microcontroller GmbH * -// * (c) 2001 - 2018 Rowley Associates Limited * -// * * -// * www.segger.com Support: support@segger.com * -// * * -// ********************************************************************** -// * * -// * All rights reserved. * -// * * -// * Redistribution and use in source and binary forms, with or * -// * without modification, are permitted provided that the following * -// * conditions are met: * -// * * -// * - Redistributions of source code must retain the above copyright * -// * notice, this list of conditions and the following disclaimer. * -// * * -// * - Neither the name of SEGGER Microcontroller GmbH * -// * nor the names of its contributors may be used to endorse or * -// * promote products derived from this software without specific * -// * prior written permission. * -// * * -// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -// * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -// * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -// * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -// * DISCLAIMED. * -// * IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -// * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -// * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -// * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -// * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -// * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -// * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -// * DAMAGE. * -// * * -// ********************************************************************** -// -// -// Preprocessor Definitions -// ------------------------ -// APP_ENTRY_POINT -// -// Defines the application entry point function, if undefined this setting -// defaults to "main". -// -// INITIALIZE_STACK -// -// If defined, the contents of the stack will be initialized to a the -// value 0xCC. -// -// INITIALIZE_SECONDARY_SECTIONS -// -// If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized. -// -// INITIALIZE_TCM_SECTIONS -// -// If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections -// will be initialized. -// -// INITIALIZE_USER_SECTIONS -// -// If defined, the function InitializeUserMemorySections will be called prior -// to entering main in order to allow the user to initialize any user defined -// memory sections. -// -// FULL_LIBRARY -// -// If defined then -// - argc, argv are setup by the debug_getargs. -// - the exit symbol is defined and executes on return from main. -// - the exit symbol calls destructors, atexit functions and then debug_exit. -// -// If not defined then -// - argc and argv are zero. -// - the exit symbol is defined, executes on return from main and loops -// - -#ifndef APP_ENTRY_POINT -#define APP_ENTRY_POINT main -#endif - -#ifndef ARGSSPACE -#define ARGSSPACE 128 -#endif - .syntax unified - - .global _start - .extern APP_ENTRY_POINT - .global exit - .weak exit - -#ifdef INITIALIZE_USER_SECTIONS - .extern InitializeUserMemorySections -#endif - - .section .init, "ax" - .code 16 - .balign 2 - .thumb_func - -_start: - /* Set up main stack if size > 0 */ - ldr r1, =__stack_end__ - ldr r0, =__stack_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - mov sp, r1 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - ldr r0, =__stack_start__ - bl memory_set -#endif -1: - - /* Set up process stack if size > 0 */ - ldr r1, =__stack_process_end__ - ldr r0, =__stack_process_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - msr psp, r1 - movs r2, #2 - msr control, r2 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - bl memory_set -#endif -1: - - /* Copy initialized memory sections into RAM (if necessary). */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl memory_copy - ldr r0, =__tdata_load_start__ - ldr r1, =__tdata_start__ - ldr r2, =__tdata_end__ - bl memory_copy -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__data2_load_start__ - ldr r1, =__data2_start__ - ldr r2, =__data2_end__ - bl memory_copy - ldr r0, =__text2_load_start__ - ldr r1, =__text2_start__ - ldr r2, =__text2_end__ - bl memory_copy - ldr r0, =__rodata2_load_start__ - ldr r1, =__rodata2_start__ - ldr r2, =__rodata2_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__data_tcm_load_start__ - ldr r1, =__data_tcm_start__ - ldr r2, =__data_tcm_end__ - bl memory_copy - ldr r0, =__text_tcm_load_start__ - ldr r1, =__text_tcm_start__ - ldr r2, =__text_tcm_end__ - bl memory_copy - ldr r0, =__rodata_tcm_load_start__ - ldr r1, =__rodata_tcm_start__ - ldr r2, =__rodata_tcm_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Zero the bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - movs r2, #0 - bl memory_set - ldr r0, =__tbss_start__ - ldr r1, =__tbss_end__ - movs r2, #0 - bl memory_set -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__bss2_start__ - ldr r1, =__bss2_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__bss_tcm_start__ - ldr r1, =__bss_tcm_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Initialize the heap */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - subs r1, r1, r0 - cmp r1, #8 - blt 1f - movs r2, #0 - str r2, [r0] - adds r0, r0, #4 - str r1, [r0] -1: - -#ifdef INITIALIZE_USER_SECTIONS - ldr r2, =InitializeUserMemorySections - blx r2 -#endif - - /* Call constructors */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -ctor_loop: - cmp r0, r1 - beq ctor_end - ldr r2, [r0] - adds r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b ctor_loop -ctor_end: - - /* Setup initial call frame */ - movs r0, #0 - mov lr, r0 - mov r12, sp - - .type start, function -start: - /* Jump to application entry point */ -#ifdef FULL_LIBRARY - movs r0, #ARGSSPACE - ldr r1, =args - ldr r2, =debug_getargs - blx r2 - ldr r1, =args -#else - movs r0, #0 - movs r1, #0 -#endif - ldr r2, =APP_ENTRY_POINT - blx r2 - - .thumb_func -exit: -#ifdef FULL_LIBRARY - mov r5, r0 // save the exit parameter/return result - - /* Call destructors */ - ldr r0, =__dtors_start__ - ldr r1, =__dtors_end__ -dtor_loop: - cmp r0, r1 - beq dtor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b dtor_loop -dtor_end: - - /* Call atexit functions */ - ldr r2, =_execute_at_exit_fns - blx r2 - - /* Call debug_exit with return result/exit parameter */ - mov r0, r5 - ldr r2, =debug_exit - blx r2 -#endif - - /* Returned from application entry point, loop forever. */ -exit_loop: - b exit_loop - - .thumb_func -memory_copy: - cmp r0, r1 - beq 2f - subs r2, r2, r1 - beq 2f -1: - ldrb r3, [r0] - adds r0, r0, #1 - strb r3, [r1] - adds r1, r1, #1 - subs r2, r2, #1 - bne 1b -2: - bx lr - - .thumb_func -memory_set: - cmp r0, r1 - beq 1f - strb r2, [r0] - adds r0, r0, #1 - b memory_set -1: - bx lr - - // default C/C++ library helpers - -.macro HELPER helper_name - .section .text.\helper_name, "ax", %progbits - .balign 2 - .global \helper_name - .weak \helper_name -\helper_name: - .thumb_func -.endm - -.macro JUMPTO name -#if defined(__thumb__) && !defined(__thumb2__) - mov r12, r0 - ldr r0, =\name - push {r0} - mov r0, r12 - pop {pc} -#else - b \name -#endif -.endm - -HELPER __aeabi_read_tp - ldr r0, =__tbss_start__-8 - bx lr -HELPER abort - b . -HELPER __assert - b . -HELPER __aeabi_assert - b . -HELPER __sync_synchronize - bx lr -HELPER __getchar - JUMPTO debug_getchar -HELPER __putchar - JUMPTO debug_putchar -HELPER __open - JUMPTO debug_fopen -HELPER __close - JUMPTO debug_fclose -HELPER __write - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fwrite -HELPER __read - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fread -HELPER __seek - push {r4, lr} - mov r4, r0 - bl debug_fseek - cmp r0, #0 - bne 1f - mov r0, r4 - bl debug_ftell - pop {r4, pc} -1: - ldr r0, =-1 - pop {r4, pc} - // char __user_locale_name_buffer[]; - .section .bss.__user_locale_name_buffer, "aw", %nobits - .global __user_locale_name_buffer - .weak __user_locale_name_buffer - __user_locale_name_buffer: - .word 0x0 - -#ifdef FULL_LIBRARY - .bss -args: - .space ARGSSPACE -#endif - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - diff --git a/examples/device/cdc_msc/ses/lpc175x_6x/LPC1700_Startup.s b/examples/device/cdc_msc/ses/lpc175x_6x/LPC1700_Startup.s deleted file mode 100644 index f039ad93..00000000 --- a/examples/device/cdc_msc/ses/lpc175x_6x/LPC1700_Startup.s +++ /dev/null @@ -1,109 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2015 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * NO_STACK_INIT * - * * - * If defined, the stack pointer will not be initialised. * - * * - * NO_SYSTEM_INIT * - * * - * If defined, the SystemInit() function will not be called. By default * - * SystemInit() is called after reset to enable the clocks and memories to * - * be initialised prior to any C startup initialisation. * - * * - * NO_VTOR_CONFIG * - * * - * If defined, the vector table offset register will not be configured. * - * * - * MEMORY_INIT * - * * - * If defined, the MemoryInit() function will be called. By default * - * MemoryInit() is called after SystemInit() to enable an external memory * - * controller. * - * * - * STACK_INIT_VAL * - * * - * If defined, specifies the initial stack pointer value. If undefined, * - * the stack pointer will be initialised to point to the end of the * - * RAM segment. * - * * - * VECTORS_IN_RAM * - * * - * If defined, the exception vectors will be copied from Flash to RAM. * - * * - *****************************************************************************/ - - .syntax unified - - .global Reset_Handler - .extern _vectors - - .section .init, "ax" - .thumb_func - - .equ VTOR_REG, 0xE000ED08 - -#ifndef STACK_INIT_VAL -#define STACK_INIT_VAL __RAM_segment_end__ -#endif - -Reset_Handler: -#ifndef NO_STACK_INIT - /* Initialise main stack */ - ldr r0, =STACK_INIT_VAL - bic r0, #0x7 - mov sp, r0 -#endif -#ifndef NO_SYSTEM_INIT - /* Initialise system */ - ldr r0, =SystemInit - blx r0 -#endif - -#ifdef MEMORY_INIT - ldr r0, =MemoryInit - blx r0 -#endif - -#ifdef VECTORS_IN_RAM - /* Copy exception vectors into RAM */ - ldr r0, =__vectors_start__ - ldr r1, =__vectors_end__ - ldr r2, =__vectors_ram_start__ -1: - cmp r0, r1 - beq 2f - ldr r3, [r0] - str r3, [r2] - adds r0, r0, #4 - adds r2, r2, #4 - b 1b -2: -#endif - -#ifndef NO_VTOR_CONFIG - /* Configure vector table offset register */ - ldr r0, =VTOR_REG -#ifdef VECTORS_IN_RAM - ldr r1, =_vectors_ram -#else - ldr r1, =_vectors -#endif - str r1, [r0] -#endif - - /* Jump to program start */ - b _start - - diff --git a/examples/device/cdc_msc/ses/lpc175x_6x/LPC1700_Target.js b/examples/device/cdc_msc/ses/lpc175x_6x/LPC1700_Target.js deleted file mode 100644 index 7f945a3d..00000000 --- a/examples/device/cdc_msc/ses/lpc175x_6x/LPC1700_Target.js +++ /dev/null @@ -1,19 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2015 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -function Reset() { - TargetInterface.resetAndStop(); -} - -function EnableTrace(traceInterfaceType) { - // TODO: Enable trace -} - diff --git a/examples/device/cdc_msc/ses/lpc175x_6x/LPC1769_MemoryMap.xml b/examples/device/cdc_msc/ses/lpc175x_6x/LPC1769_MemoryMap.xml deleted file mode 100644 index d9c07aea..00000000 --- a/examples/device/cdc_msc/ses/lpc175x_6x/LPC1769_MemoryMap.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc175x_6x/LPC176x5x_Registers.xml b/examples/device/cdc_msc/ses/lpc175x_6x/LPC176x5x_Registers.xml deleted file mode 100644 index fd38966b..00000000 --- a/examples/device/cdc_msc/ses/lpc175x_6x/LPC176x5x_Registers.xml +++ /dev/null @@ -1,11058 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc175x_6x/LPC176x5x_Vectors.s b/examples/device/cdc_msc/ses/lpc175x_6x/LPC176x5x_Vectors.s deleted file mode 100644 index c5fae131..00000000 --- a/examples/device/cdc_msc/ses/lpc175x_6x/LPC176x5x_Vectors.s +++ /dev/null @@ -1,418 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2015 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * VECTORS_IN_RAM * - * * - * If defined, an area of RAM will large enough to store the vector table * - * will be reserved. * - * * - *****************************************************************************/ - - .syntax unified - .code 16 - - .section .init, "ax" - .align 0 - -/***************************************************************************** - * Default Exception Handlers * - *****************************************************************************/ - - .thumb_func - .weak NMI_Handler -NMI_Handler: - b . - - .thumb_func - .weak HardFault_Handler -HardFault_Handler: - b . - - .thumb_func - .weak SVC_Handler -SVC_Handler: - b . - - .thumb_func - .weak PendSV_Handler -PendSV_Handler: - b . - - .thumb_func - .weak SysTick_Handler -SysTick_Handler: - b . - - .thumb_func -Dummy_Handler: - b . - -#if defined(__OPTIMIZATION_SMALL) - - .weak WDT_IRQHandler - .thumb_set WDT_IRQHandler,Dummy_Handler - - .weak TIMER0_IRQHandler - .thumb_set TIMER0_IRQHandler,Dummy_Handler - - .weak TIMER1_IRQHandler - .thumb_set TIMER1_IRQHandler,Dummy_Handler - - .weak TIMER2_IRQHandler - .thumb_set TIMER2_IRQHandler,Dummy_Handler - - .weak TIMER3_IRQHandler - .thumb_set TIMER3_IRQHandler,Dummy_Handler - - .weak UART0_IRQHandler - .thumb_set UART0_IRQHandler,Dummy_Handler - - .weak UART1_IRQHandler - .thumb_set UART1_IRQHandler,Dummy_Handler - - .weak UART2_IRQHandler - .thumb_set UART2_IRQHandler,Dummy_Handler - - .weak UART3_IRQHandler - .thumb_set UART3_IRQHandler,Dummy_Handler - - .weak PWM1_IRQHandler - .thumb_set PWM1_IRQHandler,Dummy_Handler - - .weak I2C0_IRQHandler - .thumb_set I2C0_IRQHandler,Dummy_Handler - - .weak I2C1_IRQHandler - .thumb_set I2C1_IRQHandler,Dummy_Handler - - .weak I2C2_IRQHandler - .thumb_set I2C2_IRQHandler,Dummy_Handler - - .weak SPI_IRQHandler - .thumb_set SPI_IRQHandler,Dummy_Handler - - .weak SSP0_IRQHandler - .thumb_set SSP0_IRQHandler,Dummy_Handler - - .weak SSP1_IRQHandler - .thumb_set SSP1_IRQHandler,Dummy_Handler - - .weak PLL0_IRQHandler - .thumb_set PLL0_IRQHandler,Dummy_Handler - - .weak RTC_IRQHandler - .thumb_set RTC_IRQHandler,Dummy_Handler - - .weak EINT0_IRQHandler - .thumb_set EINT0_IRQHandler,Dummy_Handler - - .weak EINT1_IRQHandler - .thumb_set EINT1_IRQHandler,Dummy_Handler - - .weak EINT2_IRQHandler - .thumb_set EINT2_IRQHandler,Dummy_Handler - - .weak EINT3_IRQHandler - .thumb_set EINT3_IRQHandler,Dummy_Handler - - .weak ADC_IRQHandler - .thumb_set ADC_IRQHandler,Dummy_Handler - - .weak BOD_IRQHandler - .thumb_set BOD_IRQHandler,Dummy_Handler - - .weak USB_IRQHandler - .thumb_set USB_IRQHandler,Dummy_Handler - - .weak CAN_IRQHandler - .thumb_set CAN_IRQHandler,Dummy_Handler - - .weak DMA_IRQHandler - .thumb_set DMA_IRQHandler,Dummy_Handler - - .weak I2S_IRQHandler - .thumb_set I2S_IRQHandler,Dummy_Handler - - .weak ENET_IRQHandler - .thumb_set ENET_IRQHandler,Dummy_Handler - - .weak RIT_IRQHandler - .thumb_set RIT_IRQHandler,Dummy_Handler - - .weak MCPWM_IRQHandler - .thumb_set MCPWM_IRQHandler,Dummy_Handler - - .weak QEI_IRQHandler - .thumb_set QEI_IRQHandler,Dummy_Handler - - .weak PLL1_IRQHandler - .thumb_set PLL1_IRQHandler,Dummy_Handler - - .weak USBActivity_IRQHandler - .thumb_set USBActivity_IRQHandler,Dummy_Handler - - .weak CANActivity_IRQHandler - .thumb_set CANActivity_IRQHandler,Dummy_Handler - -#else - - .thumb_func - .weak WDT_IRQHandler -WDT_IRQHandler: - b . - - .thumb_func - .weak TIMER0_IRQHandler -TIMER0_IRQHandler: - b . - - .thumb_func - .weak TIMER1_IRQHandler -TIMER1_IRQHandler: - b . - - .thumb_func - .weak TIMER2_IRQHandler -TIMER2_IRQHandler: - b . - - .thumb_func - .weak TIMER3_IRQHandler -TIMER3_IRQHandler: - b . - - .thumb_func - .weak UART0_IRQHandler -UART0_IRQHandler: - b . - - .thumb_func - .weak UART1_IRQHandler -UART1_IRQHandler: - b . - - .thumb_func - .weak UART2_IRQHandler -UART2_IRQHandler: - b . - - .thumb_func - .weak UART3_IRQHandler -UART3_IRQHandler: - b . - - .thumb_func - .weak PWM1_IRQHandler -PWM1_IRQHandler: - b . - - .thumb_func - .weak I2C0_IRQHandler -I2C0_IRQHandler: - b . - - .thumb_func - .weak I2C1_IRQHandler -I2C1_IRQHandler: - b . - - .thumb_func - .weak I2C2_IRQHandler -I2C2_IRQHandler: - b . - - .thumb_func - .weak SPI_IRQHandler -SPI_IRQHandler: - b . - - .thumb_func - .weak SSP0_IRQHandler -SSP0_IRQHandler: - b . - - .thumb_func - .weak SSP1_IRQHandler -SSP1_IRQHandler: - b . - - .thumb_func - .weak PLL0_IRQHandler -PLL0_IRQHandler: - b . - - .thumb_func - .weak RTC_IRQHandler -RTC_IRQHandler: - b . - - .thumb_func - .weak EINT0_IRQHandler -EINT0_IRQHandler: - b . - - .thumb_func - .weak EINT1_IRQHandler -EINT1_IRQHandler: - b . - - .thumb_func - .weak EINT2_IRQHandler -EINT2_IRQHandler: - b . - - .thumb_func - .weak EINT3_IRQHandler -EINT3_IRQHandler: - b . - - .thumb_func - .weak ADC_IRQHandler -ADC_IRQHandler: - b . - - .thumb_func - .weak BOD_IRQHandler -BOD_IRQHandler: - b . - - .thumb_func - .weak USB_IRQHandler -USB_IRQHandler: - b . - - .thumb_func - .weak CAN_IRQHandler -CAN_IRQHandler: - b . - - .thumb_func - .weak DMA_IRQHandler -DMA_IRQHandler: - b . - - .thumb_func - .weak I2S_IRQHandler -I2S_IRQHandler: - b . - - .thumb_func - .weak ENET_IRQHandler -ENET_IRQHandler: - b . - - .thumb_func - .weak RIT_IRQHandler -RIT_IRQHandler: - b . - - .thumb_func - .weak MCPWM_IRQHandler -MCPWM_IRQHandler: - b . - - .thumb_func - .weak QEI_IRQHandler -QEI_IRQHandler: - b . - - .thumb_func - .weak PLL1_IRQHandler -PLL1_IRQHandler: - b . - - .thumb_func - .weak USBActivity_IRQHandler -USBActivity_IRQHandler: - b . - - .thumb_func - .weak CANActivity_IRQHandler -CANActivity_IRQHandler: - b . - -#endif - -/***************************************************************************** - * Vector Table * - *****************************************************************************/ - - .section .vectors, "ax" - .align 0 - .global _vectors - .extern __stack_end__ - .extern Reset_Handler - -_vectors: - .word __stack_end__ - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word SVC_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word PendSV_Handler - .word SysTick_Handler - .word WDT_IRQHandler - .word TIMER0_IRQHandler - .word TIMER1_IRQHandler - .word TIMER2_IRQHandler - .word TIMER3_IRQHandler - .word UART0_IRQHandler - .word UART1_IRQHandler - .word UART2_IRQHandler - .word UART3_IRQHandler - .word PWM1_IRQHandler - .word I2C0_IRQHandler - .word I2C1_IRQHandler - .word I2C2_IRQHandler - .word SPI_IRQHandler - .word SSP0_IRQHandler - .word SSP1_IRQHandler - .word PLL0_IRQHandler - .word RTC_IRQHandler - .word EINT0_IRQHandler - .word EINT1_IRQHandler - .word EINT2_IRQHandler - .word EINT3_IRQHandler - .word ADC_IRQHandler - .word BOD_IRQHandler - .word USB_IRQHandler - .word CAN_IRQHandler - .word DMA_IRQHandler - .word I2S_IRQHandler - .word ENET_IRQHandler - .word RIT_IRQHandler - .word MCPWM_IRQHandler - .word QEI_IRQHandler - .word PLL1_IRQHandler - .word USBActivity_IRQHandler - .word CANActivity_IRQHandler -_vectors_end: - -#ifdef VECTORS_IN_RAM - .section .vectors_ram, "ax" - .align 0 - .global _vectors_ram - -_vectors_ram: - .space _vectors_end - _vectors, 0 -#endif diff --git a/examples/device/cdc_msc/ses/lpc175x_6x/flash_placement.xml b/examples/device/cdc_msc/ses/lpc175x_6x/flash_placement.xml deleted file mode 100644 index 79bedc53..00000000 --- a/examples/device/cdc_msc/ses/lpc175x_6x/flash_placement.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc175x_6x/lpc175x_6x.emProject b/examples/device/cdc_msc/ses/lpc175x_6x/lpc175x_6x.emProject deleted file mode 100644 index 7d49a90d..00000000 --- a/examples/device/cdc_msc/ses/lpc175x_6x/lpc175x_6x.emProject +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc175x_6x/thumb_crt0.s b/examples/device/cdc_msc/ses/lpc175x_6x/thumb_crt0.s deleted file mode 100644 index 17f88e0c..00000000 --- a/examples/device/cdc_msc/ses/lpc175x_6x/thumb_crt0.s +++ /dev/null @@ -1,415 +0,0 @@ -// ********************************************************************** -// * SEGGER Microcontroller GmbH * -// * The Embedded Experts * -// ********************************************************************** -// * * -// * (c) 2014 - 2018 SEGGER Microcontroller GmbH * -// * (c) 2001 - 2018 Rowley Associates Limited * -// * * -// * www.segger.com Support: support@segger.com * -// * * -// ********************************************************************** -// * * -// * All rights reserved. * -// * * -// * Redistribution and use in source and binary forms, with or * -// * without modification, are permitted provided that the following * -// * conditions are met: * -// * * -// * - Redistributions of source code must retain the above copyright * -// * notice, this list of conditions and the following disclaimer. * -// * * -// * - Neither the name of SEGGER Microcontroller GmbH * -// * nor the names of its contributors may be used to endorse or * -// * promote products derived from this software without specific * -// * prior written permission. * -// * * -// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -// * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -// * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -// * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -// * DISCLAIMED. * -// * IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -// * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -// * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -// * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -// * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -// * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -// * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -// * DAMAGE. * -// * * -// ********************************************************************** -// -// -// Preprocessor Definitions -// ------------------------ -// APP_ENTRY_POINT -// -// Defines the application entry point function, if undefined this setting -// defaults to "main". -// -// INITIALIZE_STACK -// -// If defined, the contents of the stack will be initialized to a the -// value 0xCC. -// -// INITIALIZE_SECONDARY_SECTIONS -// -// If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized. -// -// INITIALIZE_TCM_SECTIONS -// -// If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections -// will be initialized. -// -// INITIALIZE_USER_SECTIONS -// -// If defined, the function InitializeUserMemorySections will be called prior -// to entering main in order to allow the user to initialize any user defined -// memory sections. -// -// FULL_LIBRARY -// -// If defined then -// - argc, argv are setup by the debug_getargs. -// - the exit symbol is defined and executes on return from main. -// - the exit symbol calls destructors, atexit functions and then debug_exit. -// -// If not defined then -// - argc and argv are zero. -// - the exit symbol is defined, executes on return from main and loops -// - -#ifndef APP_ENTRY_POINT -#define APP_ENTRY_POINT main -#endif - -#ifndef ARGSSPACE -#define ARGSSPACE 128 -#endif - .syntax unified - - .global _start - .extern APP_ENTRY_POINT - .global exit - .weak exit - -#ifdef INITIALIZE_USER_SECTIONS - .extern InitializeUserMemorySections -#endif - - .section .init, "ax" - .code 16 - .balign 2 - .thumb_func - -_start: - /* Set up main stack if size > 0 */ - ldr r1, =__stack_end__ - ldr r0, =__stack_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - mov sp, r1 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - ldr r0, =__stack_start__ - bl memory_set -#endif -1: - - /* Set up process stack if size > 0 */ - ldr r1, =__stack_process_end__ - ldr r0, =__stack_process_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - msr psp, r1 - movs r2, #2 - msr control, r2 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - bl memory_set -#endif -1: - - /* Copy initialized memory sections into RAM (if necessary). */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl memory_copy - ldr r0, =__tdata_load_start__ - ldr r1, =__tdata_start__ - ldr r2, =__tdata_end__ - bl memory_copy -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__data2_load_start__ - ldr r1, =__data2_start__ - ldr r2, =__data2_end__ - bl memory_copy - ldr r0, =__text2_load_start__ - ldr r1, =__text2_start__ - ldr r2, =__text2_end__ - bl memory_copy - ldr r0, =__rodata2_load_start__ - ldr r1, =__rodata2_start__ - ldr r2, =__rodata2_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__data_tcm_load_start__ - ldr r1, =__data_tcm_start__ - ldr r2, =__data_tcm_end__ - bl memory_copy - ldr r0, =__text_tcm_load_start__ - ldr r1, =__text_tcm_start__ - ldr r2, =__text_tcm_end__ - bl memory_copy - ldr r0, =__rodata_tcm_load_start__ - ldr r1, =__rodata_tcm_start__ - ldr r2, =__rodata_tcm_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Zero the bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - movs r2, #0 - bl memory_set - ldr r0, =__tbss_start__ - ldr r1, =__tbss_end__ - movs r2, #0 - bl memory_set -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__bss2_start__ - ldr r1, =__bss2_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__bss_tcm_start__ - ldr r1, =__bss_tcm_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Initialize the heap */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - subs r1, r1, r0 - cmp r1, #8 - blt 1f - movs r2, #0 - str r2, [r0] - adds r0, r0, #4 - str r1, [r0] -1: - -#ifdef INITIALIZE_USER_SECTIONS - ldr r2, =InitializeUserMemorySections - blx r2 -#endif - - /* Call constructors */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -ctor_loop: - cmp r0, r1 - beq ctor_end - ldr r2, [r0] - adds r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b ctor_loop -ctor_end: - - /* Setup initial call frame */ - movs r0, #0 - mov lr, r0 - mov r12, sp - - .type start, function -start: - /* Jump to application entry point */ -#ifdef FULL_LIBRARY - movs r0, #ARGSSPACE - ldr r1, =args - ldr r2, =debug_getargs - blx r2 - ldr r1, =args -#else - movs r0, #0 - movs r1, #0 -#endif - ldr r2, =APP_ENTRY_POINT - blx r2 - - .thumb_func -exit: -#ifdef FULL_LIBRARY - mov r5, r0 // save the exit parameter/return result - - /* Call destructors */ - ldr r0, =__dtors_start__ - ldr r1, =__dtors_end__ -dtor_loop: - cmp r0, r1 - beq dtor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b dtor_loop -dtor_end: - - /* Call atexit functions */ - ldr r2, =_execute_at_exit_fns - blx r2 - - /* Call debug_exit with return result/exit parameter */ - mov r0, r5 - ldr r2, =debug_exit - blx r2 -#endif - - /* Returned from application entry point, loop forever. */ -exit_loop: - b exit_loop - - .thumb_func -memory_copy: - cmp r0, r1 - beq 2f - subs r2, r2, r1 - beq 2f -1: - ldrb r3, [r0] - adds r0, r0, #1 - strb r3, [r1] - adds r1, r1, #1 - subs r2, r2, #1 - bne 1b -2: - bx lr - - .thumb_func -memory_set: - cmp r0, r1 - beq 1f - strb r2, [r0] - adds r0, r0, #1 - b memory_set -1: - bx lr - - // default C/C++ library helpers - -.macro HELPER helper_name - .section .text.\helper_name, "ax", %progbits - .balign 2 - .global \helper_name - .weak \helper_name -\helper_name: - .thumb_func -.endm - -.macro JUMPTO name -#if defined(__thumb__) && !defined(__thumb2__) - mov r12, r0 - ldr r0, =\name - push {r0} - mov r0, r12 - pop {pc} -#else - b \name -#endif -.endm - -HELPER __aeabi_read_tp - ldr r0, =__tbss_start__-8 - bx lr -HELPER abort - b . -HELPER __assert - b . -HELPER __aeabi_assert - b . -HELPER __sync_synchronize - bx lr -HELPER __getchar - JUMPTO debug_getchar -HELPER __putchar - JUMPTO debug_putchar -HELPER __open - JUMPTO debug_fopen -HELPER __close - JUMPTO debug_fclose -HELPER __write - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fwrite -HELPER __read - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fread -HELPER __seek - push {r4, lr} - mov r4, r0 - bl debug_fseek - cmp r0, #0 - bne 1f - mov r0, r4 - bl debug_ftell - pop {r4, pc} -1: - ldr r0, =-1 - pop {r4, pc} - // char __user_locale_name_buffer[]; - .section .bss.__user_locale_name_buffer, "aw", %nobits - .global __user_locale_name_buffer - .weak __user_locale_name_buffer - __user_locale_name_buffer: - .word 0x0 - -#ifdef FULL_LIBRARY - .bss -args: - .space ARGSSPACE -#endif - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - diff --git a/examples/device/cdc_msc/ses/lpc18xx/LPC1800_Startup.s b/examples/device/cdc_msc/ses/lpc18xx/LPC1800_Startup.s deleted file mode 100644 index e17b6050..00000000 --- a/examples/device/cdc_msc/ses/lpc18xx/LPC1800_Startup.s +++ /dev/null @@ -1,110 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * NO_STACK_INIT * - * * - * If defined, the stack pointer will not be initialised. * - * * - * NO_SYSTEM_INIT * - * * - * If defined, the SystemInit() function will not be called. By default * - * SystemInit() is called after reset to enable the clocks and memories to * - * be initialised prior to any C startup initialisation. * - * * - * NO_VTOR_CONFIG * - * * - * If defined, the vector table offset register will not be configured. * - * * - * MEMORY_INIT * - * * - * If defined, the MemoryInit() function will be called. By default * - * MemoryInit() is called after SystemInit() to enable an external memory * - * controller. * - * * - * STACK_INIT_VAL * - * * - * If defined, specifies the initial stack pointer value. If undefined, * - * the stack pointer will be initialised to point to the end of the * - * RAM segment. * - * * - * VECTORS_IN_RAM * - * * - * If defined, the exception vectors will be copied from Flash to RAM. * - * * - *****************************************************************************/ - - .syntax unified - - .global Reset_Handler - .extern _vectors - - .section .init, "ax" - .thumb_func - - .equ VTOR_REG, 0xE000ED08 - -#ifndef STACK_INIT_VAL -#define STACK_INIT_VAL __RAM_segment_end__ -#endif - -Reset_Handler: -#ifndef NO_STACK_INIT - /* Initialise main stack */ - ldr r0, =STACK_INIT_VAL - bic r0, #0x7 - mov sp, r0 -#endif - -#ifndef NO_SYSTEM_INIT - /* Initialise system */ - ldr r0, =SystemInit - blx r0 -#endif - -#ifdef MEMORY_INIT - ldr r0, =MemoryInit - blx r0 -#endif - -#ifdef VECTORS_IN_RAM - /* Copy exception vectors into RAM */ - ldr r0, =__vectors_start__ - ldr r1, =__vectors_end__ - ldr r2, =__vectors_ram_start__ -1: - cmp r0, r1 - beq 2f - ldr r3, [r0] - str r3, [r2] - adds r0, r0, #4 - adds r2, r2, #4 - b 1b -2: -#endif - -#ifndef NO_VTOR_CONFIG - /* Configure vector table offset register */ - ldr r0, =VTOR_REG -#ifdef VECTORS_IN_RAM - ldr r1, =_vectors_ram -#else - ldr r1, =_vectors -#endif - str r1, [r0] -#endif - - /* Jump to program start */ - b _start - - diff --git a/examples/device/cdc_msc/ses/lpc18xx/LPC1800_Target.js b/examples/device/cdc_msc/ses/lpc18xx/LPC1800_Target.js deleted file mode 100644 index 20560af4..00000000 --- a/examples/device/cdc_msc/ses/lpc18xx/LPC1800_Target.js +++ /dev/null @@ -1,19 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -function Reset() { - TargetInterface.resetAndStop(); -} - -function EnableTrace(traceInterfaceType) { - // TODO: Enable trace -} - diff --git a/examples/device/cdc_msc/ses/lpc18xx/LPC1857_MemoryMap.xml b/examples/device/cdc_msc/ses/lpc18xx/LPC1857_MemoryMap.xml deleted file mode 100644 index 4ded8a9f..00000000 --- a/examples/device/cdc_msc/ses/lpc18xx/LPC1857_MemoryMap.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc18xx/LPC18xx_Registers.xml b/examples/device/cdc_msc/ses/lpc18xx/LPC18xx_Registers.xml deleted file mode 100644 index 5e68d4c0..00000000 --- a/examples/device/cdc_msc/ses/lpc18xx/LPC18xx_Registers.xml +++ /dev/null @@ -1,30452 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc18xx/LPC18xx_Vectors.s b/examples/device/cdc_msc/ses/lpc18xx/LPC18xx_Vectors.s deleted file mode 100644 index 8f9a39e4..00000000 --- a/examples/device/cdc_msc/ses/lpc18xx/LPC18xx_Vectors.s +++ /dev/null @@ -1,516 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * VECTORS_IN_RAM * - * * - * If defined, an area of RAM will large enough to store the vector table * - * will be reserved. * - * * - *****************************************************************************/ - - .syntax unified - .code 16 - - .section .init, "ax" - .align 0 - -/***************************************************************************** - * Default Exception Handlers * - *****************************************************************************/ - - .thumb_func - .weak NMI_Handler -NMI_Handler: - b . - - .thumb_func - .weak HardFault_Handler -HardFault_Handler: - b . - - .thumb_func - .weak SVC_Handler -SVC_Handler: - b . - - .thumb_func - .weak PendSV_Handler -PendSV_Handler: - b . - - .thumb_func - .weak SysTick_Handler -SysTick_Handler: - b . - - .thumb_func -Dummy_Handler: - b . - -#if defined(__OPTIMIZATION_SMALL) - - .weak DAC_IRQHandler - .thumb_set DAC_IRQHandler,Dummy_Handler - - .weak DMA_IRQHandler - .thumb_set DMA_IRQHandler,Dummy_Handler - - .weak FLASH_IRQHandler - .thumb_set FLASH_IRQHandler,Dummy_Handler - - .weak ETHERNET_IRQHandler - .thumb_set ETHERNET_IRQHandler,Dummy_Handler - - .weak SDIO_IRQHandler - .thumb_set SDIO_IRQHandler,Dummy_Handler - - .weak LCD_IRQHandler - .thumb_set LCD_IRQHandler,Dummy_Handler - - .weak USB0_IRQHandler - .thumb_set USB0_IRQHandler,Dummy_Handler - - .weak USB1_IRQHandler - .thumb_set USB1_IRQHandler,Dummy_Handler - - .weak SCT_IRQHandler - .thumb_set SCT_IRQHandler,Dummy_Handler - - .weak RITIMER_IRQHandler - .thumb_set RITIMER_IRQHandler,Dummy_Handler - - .weak TIMER0_IRQHandler - .thumb_set TIMER0_IRQHandler,Dummy_Handler - - .weak TIMER1_IRQHandler - .thumb_set TIMER1_IRQHandler,Dummy_Handler - - .weak TIMER2_IRQHandler - .thumb_set TIMER2_IRQHandler,Dummy_Handler - - .weak TIMER3_IRQHandler - .thumb_set TIMER3_IRQHandler,Dummy_Handler - - .weak MCPWM_IRQHandler - .thumb_set MCPWM_IRQHandler,Dummy_Handler - - .weak ADC0_IRQHandler - .thumb_set ADC0_IRQHandler,Dummy_Handler - - .weak I2C0_IRQHandler - .thumb_set I2C0_IRQHandler,Dummy_Handler - - .weak I2C1_IRQHandler - .thumb_set I2C1_IRQHandler,Dummy_Handler - - .weak ADC1_IRQHandler - .thumb_set ADC1_IRQHandler,Dummy_Handler - - .weak SSP0_IRQHandler - .thumb_set SSP0_IRQHandler,Dummy_Handler - - .weak SSP1_IRQHandler - .thumb_set SSP1_IRQHandler,Dummy_Handler - - .weak USART0_IRQHandler - .thumb_set USART0_IRQHandler,Dummy_Handler - - .weak UART1_IRQHandler - .thumb_set UART1_IRQHandler,Dummy_Handler - - .weak USART2_IRQHandler - .thumb_set USART2_IRQHandler,Dummy_Handler - - .weak USART3_IRQHandler - .thumb_set USART3_IRQHandler,Dummy_Handler - - .weak I2S0_IRQHandler - .thumb_set I2S0_IRQHandler,Dummy_Handler - - .weak I2S1_IRQHandler - .thumb_set I2S1_IRQHandler,Dummy_Handler - - .weak SPIFI_IRQHandler - .thumb_set SPIFI_IRQHandler,Dummy_Handler - - .weak PIN_INT0_IRQHandler - .thumb_set PIN_INT0_IRQHandler,Dummy_Handler - - .weak PIN_INT1_IRQHandler - .thumb_set PIN_INT1_IRQHandler,Dummy_Handler - - .weak PIN_INT2_IRQHandler - .thumb_set PIN_INT2_IRQHandler,Dummy_Handler - - .weak PIN_INT3_IRQHandler - .thumb_set PIN_INT3_IRQHandler,Dummy_Handler - - .weak PIN_INT4_IRQHandler - .thumb_set PIN_INT4_IRQHandler,Dummy_Handler - - .weak PIN_INT5_IRQHandler - .thumb_set PIN_INT5_IRQHandler,Dummy_Handler - - .weak PIN_INT6_IRQHandler - .thumb_set PIN_INT6_IRQHandler,Dummy_Handler - - .weak PIN_INT7_IRQHandler - .thumb_set PIN_INT7_IRQHandler,Dummy_Handler - - .weak GINT0_IRQHandler - .thumb_set GINT0_IRQHandler,Dummy_Handler - - .weak GINT1_IRQHandler - .thumb_set GINT1_IRQHandler,Dummy_Handler - - .weak EVENTROUTER_IRQHandler - .thumb_set EVENTROUTER_IRQHandler,Dummy_Handler - - .weak C_CAN1_IRQHandler - .thumb_set C_CAN1_IRQHandler,Dummy_Handler - - .weak ATIMER_IRQHandler - .thumb_set ATIMER_IRQHandler,Dummy_Handler - - .weak RTC_IRQHandler - .thumb_set RTC_IRQHandler,Dummy_Handler - - .weak WWDT_IRQHandler - .thumb_set WWDT_IRQHandler,Dummy_Handler - - .weak C_CAN0_IRQHandler - .thumb_set C_CAN0_IRQHandler,Dummy_Handler - - .weak QEI_IRQHandler - .thumb_set QEI_IRQHandler,Dummy_Handler - -#else - - .thumb_func - .weak DAC_IRQHandler -DAC_IRQHandler: - b . - - .thumb_func - .weak DMA_IRQHandler -DMA_IRQHandler: - b . - - .thumb_func - .weak FLASH_IRQHandler -FLASH_IRQHandler: - b . - - .thumb_func - .weak ETHERNET_IRQHandler -ETHERNET_IRQHandler: - b . - - .thumb_func - .weak SDIO_IRQHandler -SDIO_IRQHandler: - b . - - .thumb_func - .weak LCD_IRQHandler -LCD_IRQHandler: - b . - - .thumb_func - .weak USB0_IRQHandler -USB0_IRQHandler: - b . - - .thumb_func - .weak USB1_IRQHandler -USB1_IRQHandler: - b . - - .thumb_func - .weak SCT_IRQHandler -SCT_IRQHandler: - b . - - .thumb_func - .weak RITIMER_IRQHandler -RITIMER_IRQHandler: - b . - - .thumb_func - .weak TIMER0_IRQHandler -TIMER0_IRQHandler: - b . - - .thumb_func - .weak TIMER1_IRQHandler -TIMER1_IRQHandler: - b . - - .thumb_func - .weak TIMER2_IRQHandler -TIMER2_IRQHandler: - b . - - .thumb_func - .weak TIMER3_IRQHandler -TIMER3_IRQHandler: - b . - - .thumb_func - .weak MCPWM_IRQHandler -MCPWM_IRQHandler: - b . - - .thumb_func - .weak ADC0_IRQHandler -ADC0_IRQHandler: - b . - - .thumb_func - .weak I2C0_IRQHandler -I2C0_IRQHandler: - b . - - .thumb_func - .weak I2C1_IRQHandler -I2C1_IRQHandler: - b . - - .thumb_func - .weak ADC1_IRQHandler -ADC1_IRQHandler: - b . - - .thumb_func - .weak SSP0_IRQHandler -SSP0_IRQHandler: - b . - - .thumb_func - .weak SSP1_IRQHandler -SSP1_IRQHandler: - b . - - .thumb_func - .weak USART0_IRQHandler -USART0_IRQHandler: - b . - - .thumb_func - .weak UART1_IRQHandler -UART1_IRQHandler: - b . - - .thumb_func - .weak USART2_IRQHandler -USART2_IRQHandler: - b . - - .thumb_func - .weak USART3_IRQHandler -USART3_IRQHandler: - b . - - .thumb_func - .weak I2S0_IRQHandler -I2S0_IRQHandler: - b . - - .thumb_func - .weak I2S1_IRQHandler -I2S1_IRQHandler: - b . - - .thumb_func - .weak SPIFI_IRQHandler -SPIFI_IRQHandler: - b . - - .thumb_func - .weak PIN_INT0_IRQHandler -PIN_INT0_IRQHandler: - b . - - .thumb_func - .weak PIN_INT1_IRQHandler -PIN_INT1_IRQHandler: - b . - - .thumb_func - .weak PIN_INT2_IRQHandler -PIN_INT2_IRQHandler: - b . - - .thumb_func - .weak PIN_INT3_IRQHandler -PIN_INT3_IRQHandler: - b . - - .thumb_func - .weak PIN_INT4_IRQHandler -PIN_INT4_IRQHandler: - b . - - .thumb_func - .weak PIN_INT5_IRQHandler -PIN_INT5_IRQHandler: - b . - - .thumb_func - .weak PIN_INT6_IRQHandler -PIN_INT6_IRQHandler: - b . - - .thumb_func - .weak PIN_INT7_IRQHandler -PIN_INT7_IRQHandler: - b . - - .thumb_func - .weak GINT0_IRQHandler -GINT0_IRQHandler: - b . - - .thumb_func - .weak GINT1_IRQHandler -GINT1_IRQHandler: - b . - - .thumb_func - .weak EVENTROUTER_IRQHandler -EVENTROUTER_IRQHandler: - b . - - .thumb_func - .weak C_CAN1_IRQHandler -C_CAN1_IRQHandler: - b . - - .thumb_func - .weak ATIMER_IRQHandler -ATIMER_IRQHandler: - b . - - .thumb_func - .weak RTC_IRQHandler -RTC_IRQHandler: - b . - - .thumb_func - .weak WWDT_IRQHandler -WWDT_IRQHandler: - b . - - .thumb_func - .weak C_CAN0_IRQHandler -C_CAN0_IRQHandler: - b . - - .thumb_func - .weak QEI_IRQHandler -QEI_IRQHandler: - b . - -#endif - -/***************************************************************************** - * Vector Table * - *****************************************************************************/ - - .section .vectors, "ax" - .align 0 - .global _vectors - .extern __stack_end__ - .extern Reset_Handler - -_vectors: - .word __stack_end__ - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word SVC_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word PendSV_Handler - .word SysTick_Handler - .word DAC_IRQHandler - .word Dummy_Handler /* Reserved */ - .word DMA_IRQHandler - .word Dummy_Handler /* Reserved */ - .word FLASH_IRQHandler - .word ETHERNET_IRQHandler - .word SDIO_IRQHandler - .word LCD_IRQHandler - .word USB0_IRQHandler - .word USB1_IRQHandler - .word SCT_IRQHandler - .word RITIMER_IRQHandler - .word TIMER0_IRQHandler - .word TIMER1_IRQHandler - .word TIMER2_IRQHandler - .word TIMER3_IRQHandler - .word MCPWM_IRQHandler - .word ADC0_IRQHandler - .word I2C0_IRQHandler - .word I2C1_IRQHandler - .word Dummy_Handler /* Reserved */ - .word ADC1_IRQHandler - .word SSP0_IRQHandler - .word SSP1_IRQHandler - .word USART0_IRQHandler - .word UART1_IRQHandler - .word USART2_IRQHandler - .word USART3_IRQHandler - .word I2S0_IRQHandler - .word I2S1_IRQHandler - .word SPIFI_IRQHandler - .word Dummy_Handler /* Reserved */ - .word PIN_INT0_IRQHandler - .word PIN_INT1_IRQHandler - .word PIN_INT2_IRQHandler - .word PIN_INT3_IRQHandler - .word PIN_INT4_IRQHandler - .word PIN_INT5_IRQHandler - .word PIN_INT6_IRQHandler - .word PIN_INT7_IRQHandler - .word GINT0_IRQHandler - .word GINT1_IRQHandler - .word EVENTROUTER_IRQHandler - .word C_CAN1_IRQHandler - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word ATIMER_IRQHandler - .word RTC_IRQHandler - .word Dummy_Handler /* Reserved */ - .word WWDT_IRQHandler - .word Dummy_Handler /* Reserved */ - .word C_CAN0_IRQHandler - .word QEI_IRQHandler -_vectors_end: - -#ifdef VECTORS_IN_RAM - .section .vectors_ram, "ax" - .align 0 - .global _vectors_ram - -_vectors_ram: - .space _vectors_end - _vectors, 0 -#endif diff --git a/examples/device/cdc_msc/ses/lpc18xx/flash_placement.xml b/examples/device/cdc_msc/ses/lpc18xx/flash_placement.xml deleted file mode 100644 index 79bedc53..00000000 --- a/examples/device/cdc_msc/ses/lpc18xx/flash_placement.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc18xx/lpc18xx.emProject b/examples/device/cdc_msc/ses/lpc18xx/lpc18xx.emProject deleted file mode 100644 index 8f7d91b2..00000000 --- a/examples/device/cdc_msc/ses/lpc18xx/lpc18xx.emProject +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc18xx/thumb_crt0.s b/examples/device/cdc_msc/ses/lpc18xx/thumb_crt0.s deleted file mode 100644 index 17f88e0c..00000000 --- a/examples/device/cdc_msc/ses/lpc18xx/thumb_crt0.s +++ /dev/null @@ -1,415 +0,0 @@ -// ********************************************************************** -// * SEGGER Microcontroller GmbH * -// * The Embedded Experts * -// ********************************************************************** -// * * -// * (c) 2014 - 2018 SEGGER Microcontroller GmbH * -// * (c) 2001 - 2018 Rowley Associates Limited * -// * * -// * www.segger.com Support: support@segger.com * -// * * -// ********************************************************************** -// * * -// * All rights reserved. * -// * * -// * Redistribution and use in source and binary forms, with or * -// * without modification, are permitted provided that the following * -// * conditions are met: * -// * * -// * - Redistributions of source code must retain the above copyright * -// * notice, this list of conditions and the following disclaimer. * -// * * -// * - Neither the name of SEGGER Microcontroller GmbH * -// * nor the names of its contributors may be used to endorse or * -// * promote products derived from this software without specific * -// * prior written permission. * -// * * -// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -// * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -// * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -// * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -// * DISCLAIMED. * -// * IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -// * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -// * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -// * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -// * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -// * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -// * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -// * DAMAGE. * -// * * -// ********************************************************************** -// -// -// Preprocessor Definitions -// ------------------------ -// APP_ENTRY_POINT -// -// Defines the application entry point function, if undefined this setting -// defaults to "main". -// -// INITIALIZE_STACK -// -// If defined, the contents of the stack will be initialized to a the -// value 0xCC. -// -// INITIALIZE_SECONDARY_SECTIONS -// -// If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized. -// -// INITIALIZE_TCM_SECTIONS -// -// If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections -// will be initialized. -// -// INITIALIZE_USER_SECTIONS -// -// If defined, the function InitializeUserMemorySections will be called prior -// to entering main in order to allow the user to initialize any user defined -// memory sections. -// -// FULL_LIBRARY -// -// If defined then -// - argc, argv are setup by the debug_getargs. -// - the exit symbol is defined and executes on return from main. -// - the exit symbol calls destructors, atexit functions and then debug_exit. -// -// If not defined then -// - argc and argv are zero. -// - the exit symbol is defined, executes on return from main and loops -// - -#ifndef APP_ENTRY_POINT -#define APP_ENTRY_POINT main -#endif - -#ifndef ARGSSPACE -#define ARGSSPACE 128 -#endif - .syntax unified - - .global _start - .extern APP_ENTRY_POINT - .global exit - .weak exit - -#ifdef INITIALIZE_USER_SECTIONS - .extern InitializeUserMemorySections -#endif - - .section .init, "ax" - .code 16 - .balign 2 - .thumb_func - -_start: - /* Set up main stack if size > 0 */ - ldr r1, =__stack_end__ - ldr r0, =__stack_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - mov sp, r1 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - ldr r0, =__stack_start__ - bl memory_set -#endif -1: - - /* Set up process stack if size > 0 */ - ldr r1, =__stack_process_end__ - ldr r0, =__stack_process_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - msr psp, r1 - movs r2, #2 - msr control, r2 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - bl memory_set -#endif -1: - - /* Copy initialized memory sections into RAM (if necessary). */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl memory_copy - ldr r0, =__tdata_load_start__ - ldr r1, =__tdata_start__ - ldr r2, =__tdata_end__ - bl memory_copy -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__data2_load_start__ - ldr r1, =__data2_start__ - ldr r2, =__data2_end__ - bl memory_copy - ldr r0, =__text2_load_start__ - ldr r1, =__text2_start__ - ldr r2, =__text2_end__ - bl memory_copy - ldr r0, =__rodata2_load_start__ - ldr r1, =__rodata2_start__ - ldr r2, =__rodata2_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__data_tcm_load_start__ - ldr r1, =__data_tcm_start__ - ldr r2, =__data_tcm_end__ - bl memory_copy - ldr r0, =__text_tcm_load_start__ - ldr r1, =__text_tcm_start__ - ldr r2, =__text_tcm_end__ - bl memory_copy - ldr r0, =__rodata_tcm_load_start__ - ldr r1, =__rodata_tcm_start__ - ldr r2, =__rodata_tcm_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Zero the bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - movs r2, #0 - bl memory_set - ldr r0, =__tbss_start__ - ldr r1, =__tbss_end__ - movs r2, #0 - bl memory_set -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__bss2_start__ - ldr r1, =__bss2_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__bss_tcm_start__ - ldr r1, =__bss_tcm_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Initialize the heap */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - subs r1, r1, r0 - cmp r1, #8 - blt 1f - movs r2, #0 - str r2, [r0] - adds r0, r0, #4 - str r1, [r0] -1: - -#ifdef INITIALIZE_USER_SECTIONS - ldr r2, =InitializeUserMemorySections - blx r2 -#endif - - /* Call constructors */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -ctor_loop: - cmp r0, r1 - beq ctor_end - ldr r2, [r0] - adds r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b ctor_loop -ctor_end: - - /* Setup initial call frame */ - movs r0, #0 - mov lr, r0 - mov r12, sp - - .type start, function -start: - /* Jump to application entry point */ -#ifdef FULL_LIBRARY - movs r0, #ARGSSPACE - ldr r1, =args - ldr r2, =debug_getargs - blx r2 - ldr r1, =args -#else - movs r0, #0 - movs r1, #0 -#endif - ldr r2, =APP_ENTRY_POINT - blx r2 - - .thumb_func -exit: -#ifdef FULL_LIBRARY - mov r5, r0 // save the exit parameter/return result - - /* Call destructors */ - ldr r0, =__dtors_start__ - ldr r1, =__dtors_end__ -dtor_loop: - cmp r0, r1 - beq dtor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b dtor_loop -dtor_end: - - /* Call atexit functions */ - ldr r2, =_execute_at_exit_fns - blx r2 - - /* Call debug_exit with return result/exit parameter */ - mov r0, r5 - ldr r2, =debug_exit - blx r2 -#endif - - /* Returned from application entry point, loop forever. */ -exit_loop: - b exit_loop - - .thumb_func -memory_copy: - cmp r0, r1 - beq 2f - subs r2, r2, r1 - beq 2f -1: - ldrb r3, [r0] - adds r0, r0, #1 - strb r3, [r1] - adds r1, r1, #1 - subs r2, r2, #1 - bne 1b -2: - bx lr - - .thumb_func -memory_set: - cmp r0, r1 - beq 1f - strb r2, [r0] - adds r0, r0, #1 - b memory_set -1: - bx lr - - // default C/C++ library helpers - -.macro HELPER helper_name - .section .text.\helper_name, "ax", %progbits - .balign 2 - .global \helper_name - .weak \helper_name -\helper_name: - .thumb_func -.endm - -.macro JUMPTO name -#if defined(__thumb__) && !defined(__thumb2__) - mov r12, r0 - ldr r0, =\name - push {r0} - mov r0, r12 - pop {pc} -#else - b \name -#endif -.endm - -HELPER __aeabi_read_tp - ldr r0, =__tbss_start__-8 - bx lr -HELPER abort - b . -HELPER __assert - b . -HELPER __aeabi_assert - b . -HELPER __sync_synchronize - bx lr -HELPER __getchar - JUMPTO debug_getchar -HELPER __putchar - JUMPTO debug_putchar -HELPER __open - JUMPTO debug_fopen -HELPER __close - JUMPTO debug_fclose -HELPER __write - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fwrite -HELPER __read - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fread -HELPER __seek - push {r4, lr} - mov r4, r0 - bl debug_fseek - cmp r0, #0 - bne 1f - mov r0, r4 - bl debug_ftell - pop {r4, pc} -1: - ldr r0, =-1 - pop {r4, pc} - // char __user_locale_name_buffer[]; - .section .bss.__user_locale_name_buffer, "aw", %nobits - .global __user_locale_name_buffer - .weak __user_locale_name_buffer - __user_locale_name_buffer: - .word 0x0 - -#ifdef FULL_LIBRARY - .bss -args: - .space ARGSSPACE -#endif - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - diff --git a/examples/device/cdc_msc/ses/lpc40xx/LPC4000_Startup.s b/examples/device/cdc_msc/ses/lpc40xx/LPC4000_Startup.s deleted file mode 100644 index 03bf54de..00000000 --- a/examples/device/cdc_msc/ses/lpc40xx/LPC4000_Startup.s +++ /dev/null @@ -1,128 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * NO_FPU_ENABLE * - * * - * If defined, FPU will not be enabled. * - * * - * NO_STACK_INIT * - * * - * If defined, the stack pointer will not be initialised. * - * * - * NO_SYSTEM_INIT * - * * - * If defined, the SystemInit() function will not be called. By default * - * SystemInit() is called after reset to enable the clocks and memories to * - * be initialised prior to any C startup initialisation. * - * * - * NO_VTOR_CONFIG * - * * - * If defined, the vector table offset register will not be configured. * - * * - * MEMORY_INIT * - * * - * If defined, the MemoryInit() function will be called. By default * - * MemoryInit() is called after SystemInit() to enable an external memory * - * controller. * - * * - * STACK_INIT_VAL * - * * - * If defined, specifies the initial stack pointer value. If undefined, * - * the stack pointer will be initialised to point to the end of the * - * RAM segment. * - * * - * VECTORS_IN_RAM * - * * - * If defined, the exception vectors will be copied from Flash to RAM. * - * * - *****************************************************************************/ - - .syntax unified - - .global Reset_Handler - .extern _vectors - - .section .init, "ax" - .thumb_func - - .equ VTOR_REG, 0xE000ED08 - .equ FPU_CPACR_REG, 0xE000ED88 - -#ifndef STACK_INIT_VAL -#define STACK_INIT_VAL __RAM_segment_end__ -#endif - -Reset_Handler: -#ifndef NO_STACK_INIT - /* Initialise main stack */ - ldr r0, =STACK_INIT_VAL - bic r0, #0x7 - mov sp, r0 -#endif - -#ifndef NO_SYSTEM_INIT - /* Initialise system */ - ldr r0, =SystemInit - blx r0 - .pushsection .init_array, "aw", %init_array - .word SystemCoreClockUpdate - .popsection -#endif - -#ifdef MEMORY_INIT - ldr r0, =MemoryInit - blx r0 -#endif - -#ifdef VECTORS_IN_RAM - /* Copy exception vectors into RAM */ - ldr r0, =__vectors_start__ - ldr r1, =__vectors_end__ - ldr r2, =__vectors_ram_start__ -1: - cmp r0, r1 - beq 2f - ldr r3, [r0] - str r3, [r2] - adds r0, r0, #4 - adds r2, r2, #4 - b 1b -2: -#endif - -#ifndef NO_VTOR_CONFIG - /* Configure vector table offset register */ - ldr r0, =VTOR_REG -#ifdef VECTORS_IN_RAM - ldr r1, =_vectors_ram -#else - ldr r1, =_vectors -#endif - str r1, [r0] -#endif - -#if (defined(__ARM_ARCH_FPV4_SP_D16__) || defined(__ARM_ARCH_FPV5_D16__)) && !defined(NO_FPU_ENABLE) - /* Enable FPU */ - ldr r0, =FPU_CPACR_REG - ldr r1, [r0] - orr r1, r1, #(0xF << 20) - str r1, [r0] - dsb - isb -#endif - - /* Jump to program start */ - b _start - - diff --git a/examples/device/cdc_msc/ses/lpc40xx/LPC4000_Target.js b/examples/device/cdc_msc/ses/lpc40xx/LPC4000_Target.js deleted file mode 100644 index 20560af4..00000000 --- a/examples/device/cdc_msc/ses/lpc40xx/LPC4000_Target.js +++ /dev/null @@ -1,19 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -function Reset() { - TargetInterface.resetAndStop(); -} - -function EnableTrace(traceInterfaceType) { - // TODO: Enable trace -} - diff --git a/examples/device/cdc_msc/ses/lpc40xx/LPC4088FBD208_MemoryMap.xml b/examples/device/cdc_msc/ses/lpc40xx/LPC4088FBD208_MemoryMap.xml deleted file mode 100644 index 9b8f2d9b..00000000 --- a/examples/device/cdc_msc/ses/lpc40xx/LPC4088FBD208_MemoryMap.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc40xx/LPC408x_7x_Registers.xml b/examples/device/cdc_msc/ses/lpc40xx/LPC408x_7x_Registers.xml deleted file mode 100644 index 4a4c0817..00000000 --- a/examples/device/cdc_msc/ses/lpc40xx/LPC408x_7x_Registers.xml +++ /dev/null @@ -1,18992 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc40xx/LPC408x_7x_Vectors.s b/examples/device/cdc_msc/ses/lpc40xx/LPC408x_7x_Vectors.s deleted file mode 100644 index 02568546..00000000 --- a/examples/device/cdc_msc/ses/lpc40xx/LPC408x_7x_Vectors.s +++ /dev/null @@ -1,458 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * VECTORS_IN_RAM * - * * - * If defined, an area of RAM will large enough to store the vector table * - * will be reserved. * - * * - *****************************************************************************/ - - .syntax unified - .code 16 - - .section .init, "ax" - .align 0 - -/***************************************************************************** - * Default Exception Handlers * - *****************************************************************************/ - - .thumb_func - .weak NMI_Handler -NMI_Handler: - b . - - .thumb_func - .weak HardFault_Handler -HardFault_Handler: - b . - - .thumb_func - .weak SVC_Handler -SVC_Handler: - b . - - .thumb_func - .weak PendSV_Handler -PendSV_Handler: - b . - - .thumb_func - .weak SysTick_Handler -SysTick_Handler: - b . - - .thumb_func -Dummy_Handler: - b . - -#if defined(__OPTIMIZATION_SMALL) - - .weak WWDT_IRQHandler - .thumb_set WWDT_IRQHandler,Dummy_Handler - - .weak TIMER0_IRQHandler - .thumb_set TIMER0_IRQHandler,Dummy_Handler - - .weak TIMER1_IRQHandler - .thumb_set TIMER1_IRQHandler,Dummy_Handler - - .weak TIMER2_IRQHandler - .thumb_set TIMER2_IRQHandler,Dummy_Handler - - .weak TIMER3_IRQHandler - .thumb_set TIMER3_IRQHandler,Dummy_Handler - - .weak UART0_IRQHandler - .thumb_set UART0_IRQHandler,Dummy_Handler - - .weak UART1_IRQHandler - .thumb_set UART1_IRQHandler,Dummy_Handler - - .weak UART2_IRQHandler - .thumb_set UART2_IRQHandler,Dummy_Handler - - .weak UART3_IRQHandler - .thumb_set UART3_IRQHandler,Dummy_Handler - - .weak PWM1_IRQHandler - .thumb_set PWM1_IRQHandler,Dummy_Handler - - .weak I2C0_IRQHandler - .thumb_set I2C0_IRQHandler,Dummy_Handler - - .weak I2C1_IRQHandler - .thumb_set I2C1_IRQHandler,Dummy_Handler - - .weak I2C2_IRQHandler - .thumb_set I2C2_IRQHandler,Dummy_Handler - - .weak SSP0_IRQHandler - .thumb_set SSP0_IRQHandler,Dummy_Handler - - .weak SSP1_IRQHandler - .thumb_set SSP1_IRQHandler,Dummy_Handler - - .weak RTC_IRQHandler - .thumb_set RTC_IRQHandler,Dummy_Handler - - .weak EINT0_IRQHandler - .thumb_set EINT0_IRQHandler,Dummy_Handler - - .weak EINT1_IRQHandler - .thumb_set EINT1_IRQHandler,Dummy_Handler - - .weak EINT2_IRQHandler - .thumb_set EINT2_IRQHandler,Dummy_Handler - - .weak EINT3_IRQHandler - .thumb_set EINT3_IRQHandler,Dummy_Handler - - .weak ADC_IRQHandler - .thumb_set ADC_IRQHandler,Dummy_Handler - - .weak BOD_IRQHandler - .thumb_set BOD_IRQHandler,Dummy_Handler - - .weak USB_IRQHandler - .thumb_set USB_IRQHandler,Dummy_Handler - - .weak CAN_IRQHandler - .thumb_set CAN_IRQHandler,Dummy_Handler - - .weak GPDMA_IRQHandler - .thumb_set GPDMA_IRQHandler,Dummy_Handler - - .weak I2S_IRQHandler - .thumb_set I2S_IRQHandler,Dummy_Handler - - .weak ETHERNET_IRQHandler - .thumb_set ETHERNET_IRQHandler,Dummy_Handler - - .weak SDMMC_IRQHandler - .thumb_set SDMMC_IRQHandler,Dummy_Handler - - .weak MCPWM_IRQHandler - .thumb_set MCPWM_IRQHandler,Dummy_Handler - - .weak QEI_IRQHandler - .thumb_set QEI_IRQHandler,Dummy_Handler - - .weak USB_NEED_CLK_IRQHandler - .thumb_set USB_NEED_CLK_IRQHandler,Dummy_Handler - - .weak UART4_IRQHandler - .thumb_set UART4_IRQHandler,Dummy_Handler - - .weak SSP2_IRQHandler - .thumb_set SSP2_IRQHandler,Dummy_Handler - - .weak LCD_IRQHandler - .thumb_set LCD_IRQHandler,Dummy_Handler - - .weak GPIOINT_IRQHandler - .thumb_set GPIOINT_IRQHandler,Dummy_Handler - - .weak PWM0_IRQHandler - .thumb_set PWM0_IRQHandler,Dummy_Handler - - .weak EEPROM_IRQHandler - .thumb_set EEPROM_IRQHandler,Dummy_Handler - - .weak CMP0_IRQHandler - .thumb_set CMP0_IRQHandler,Dummy_Handler - - .weak CMP1_IRQHandler - .thumb_set CMP1_IRQHandler,Dummy_Handler - -#else - - .thumb_func - .weak WWDT_IRQHandler -WWDT_IRQHandler: - b . - - .thumb_func - .weak TIMER0_IRQHandler -TIMER0_IRQHandler: - b . - - .thumb_func - .weak TIMER1_IRQHandler -TIMER1_IRQHandler: - b . - - .thumb_func - .weak TIMER2_IRQHandler -TIMER2_IRQHandler: - b . - - .thumb_func - .weak TIMER3_IRQHandler -TIMER3_IRQHandler: - b . - - .thumb_func - .weak UART0_IRQHandler -UART0_IRQHandler: - b . - - .thumb_func - .weak UART1_IRQHandler -UART1_IRQHandler: - b . - - .thumb_func - .weak UART2_IRQHandler -UART2_IRQHandler: - b . - - .thumb_func - .weak UART3_IRQHandler -UART3_IRQHandler: - b . - - .thumb_func - .weak PWM1_IRQHandler -PWM1_IRQHandler: - b . - - .thumb_func - .weak I2C0_IRQHandler -I2C0_IRQHandler: - b . - - .thumb_func - .weak I2C1_IRQHandler -I2C1_IRQHandler: - b . - - .thumb_func - .weak I2C2_IRQHandler -I2C2_IRQHandler: - b . - - .thumb_func - .weak SSP0_IRQHandler -SSP0_IRQHandler: - b . - - .thumb_func - .weak SSP1_IRQHandler -SSP1_IRQHandler: - b . - - .thumb_func - .weak RTC_IRQHandler -RTC_IRQHandler: - b . - - .thumb_func - .weak EINT0_IRQHandler -EINT0_IRQHandler: - b . - - .thumb_func - .weak EINT1_IRQHandler -EINT1_IRQHandler: - b . - - .thumb_func - .weak EINT2_IRQHandler -EINT2_IRQHandler: - b . - - .thumb_func - .weak EINT3_IRQHandler -EINT3_IRQHandler: - b . - - .thumb_func - .weak ADC_IRQHandler -ADC_IRQHandler: - b . - - .thumb_func - .weak BOD_IRQHandler -BOD_IRQHandler: - b . - - .thumb_func - .weak USB_IRQHandler -USB_IRQHandler: - b . - - .thumb_func - .weak CAN_IRQHandler -CAN_IRQHandler: - b . - - .thumb_func - .weak GPDMA_IRQHandler -GPDMA_IRQHandler: - b . - - .thumb_func - .weak I2S_IRQHandler -I2S_IRQHandler: - b . - - .thumb_func - .weak ETHERNET_IRQHandler -ETHERNET_IRQHandler: - b . - - .thumb_func - .weak SDMMC_IRQHandler -SDMMC_IRQHandler: - b . - - .thumb_func - .weak MCPWM_IRQHandler -MCPWM_IRQHandler: - b . - - .thumb_func - .weak QEI_IRQHandler -QEI_IRQHandler: - b . - - .thumb_func - .weak USB_NEED_CLK_IRQHandler -USB_NEED_CLK_IRQHandler: - b . - - .thumb_func - .weak UART4_IRQHandler -UART4_IRQHandler: - b . - - .thumb_func - .weak SSP2_IRQHandler -SSP2_IRQHandler: - b . - - .thumb_func - .weak LCD_IRQHandler -LCD_IRQHandler: - b . - - .thumb_func - .weak GPIOINT_IRQHandler -GPIOINT_IRQHandler: - b . - - .thumb_func - .weak PWM0_IRQHandler -PWM0_IRQHandler: - b . - - .thumb_func - .weak EEPROM_IRQHandler -EEPROM_IRQHandler: - b . - - .thumb_func - .weak CMP0_IRQHandler -CMP0_IRQHandler: - b . - - .thumb_func - .weak CMP1_IRQHandler -CMP1_IRQHandler: - b . - -#endif - -/***************************************************************************** - * Vector Table * - *****************************************************************************/ - - .section .vectors, "ax" - .align 0 - .global _vectors - .extern __stack_end__ - .extern Reset_Handler - -_vectors: - .word __stack_end__ - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word SVC_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word PendSV_Handler - .word SysTick_Handler - .word WWDT_IRQHandler - .word TIMER0_IRQHandler - .word TIMER1_IRQHandler - .word TIMER2_IRQHandler - .word TIMER3_IRQHandler - .word UART0_IRQHandler - .word UART1_IRQHandler - .word UART2_IRQHandler - .word UART3_IRQHandler - .word PWM1_IRQHandler - .word I2C0_IRQHandler - .word I2C1_IRQHandler - .word I2C2_IRQHandler - .word Dummy_Handler /* Reserved */ - .word SSP0_IRQHandler - .word SSP1_IRQHandler - .word Dummy_Handler /* Reserved */ - .word RTC_IRQHandler - .word EINT0_IRQHandler - .word EINT1_IRQHandler - .word EINT2_IRQHandler - .word EINT3_IRQHandler - .word ADC_IRQHandler - .word BOD_IRQHandler - .word USB_IRQHandler - .word CAN_IRQHandler - .word GPDMA_IRQHandler - .word I2S_IRQHandler - .word ETHERNET_IRQHandler - .word SDMMC_IRQHandler - .word MCPWM_IRQHandler - .word QEI_IRQHandler - .word Dummy_Handler /* Reserved */ - .word USB_NEED_CLK_IRQHandler - .word Dummy_Handler /* Reserved */ - .word UART4_IRQHandler - .word SSP2_IRQHandler - .word LCD_IRQHandler - .word GPIOINT_IRQHandler - .word PWM0_IRQHandler - .word EEPROM_IRQHandler - .word CMP0_IRQHandler - .word CMP1_IRQHandler -_vectors_end: - -#ifdef VECTORS_IN_RAM - .section .vectors_ram, "ax" - .align 0 - .global _vectors_ram - -_vectors_ram: - .space _vectors_end - _vectors, 0 -#endif diff --git a/examples/device/cdc_msc/ses/lpc40xx/flash_placement.xml b/examples/device/cdc_msc/ses/lpc40xx/flash_placement.xml deleted file mode 100644 index 79bedc53..00000000 --- a/examples/device/cdc_msc/ses/lpc40xx/flash_placement.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc40xx/lpc40xx.emProject b/examples/device/cdc_msc/ses/lpc40xx/lpc40xx.emProject deleted file mode 100644 index 4a61181c..00000000 --- a/examples/device/cdc_msc/ses/lpc40xx/lpc40xx.emProject +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc40xx/thumb_crt0.s b/examples/device/cdc_msc/ses/lpc40xx/thumb_crt0.s deleted file mode 100644 index 17f88e0c..00000000 --- a/examples/device/cdc_msc/ses/lpc40xx/thumb_crt0.s +++ /dev/null @@ -1,415 +0,0 @@ -// ********************************************************************** -// * SEGGER Microcontroller GmbH * -// * The Embedded Experts * -// ********************************************************************** -// * * -// * (c) 2014 - 2018 SEGGER Microcontroller GmbH * -// * (c) 2001 - 2018 Rowley Associates Limited * -// * * -// * www.segger.com Support: support@segger.com * -// * * -// ********************************************************************** -// * * -// * All rights reserved. * -// * * -// * Redistribution and use in source and binary forms, with or * -// * without modification, are permitted provided that the following * -// * conditions are met: * -// * * -// * - Redistributions of source code must retain the above copyright * -// * notice, this list of conditions and the following disclaimer. * -// * * -// * - Neither the name of SEGGER Microcontroller GmbH * -// * nor the names of its contributors may be used to endorse or * -// * promote products derived from this software without specific * -// * prior written permission. * -// * * -// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -// * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -// * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -// * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -// * DISCLAIMED. * -// * IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -// * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -// * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -// * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -// * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -// * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -// * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -// * DAMAGE. * -// * * -// ********************************************************************** -// -// -// Preprocessor Definitions -// ------------------------ -// APP_ENTRY_POINT -// -// Defines the application entry point function, if undefined this setting -// defaults to "main". -// -// INITIALIZE_STACK -// -// If defined, the contents of the stack will be initialized to a the -// value 0xCC. -// -// INITIALIZE_SECONDARY_SECTIONS -// -// If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized. -// -// INITIALIZE_TCM_SECTIONS -// -// If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections -// will be initialized. -// -// INITIALIZE_USER_SECTIONS -// -// If defined, the function InitializeUserMemorySections will be called prior -// to entering main in order to allow the user to initialize any user defined -// memory sections. -// -// FULL_LIBRARY -// -// If defined then -// - argc, argv are setup by the debug_getargs. -// - the exit symbol is defined and executes on return from main. -// - the exit symbol calls destructors, atexit functions and then debug_exit. -// -// If not defined then -// - argc and argv are zero. -// - the exit symbol is defined, executes on return from main and loops -// - -#ifndef APP_ENTRY_POINT -#define APP_ENTRY_POINT main -#endif - -#ifndef ARGSSPACE -#define ARGSSPACE 128 -#endif - .syntax unified - - .global _start - .extern APP_ENTRY_POINT - .global exit - .weak exit - -#ifdef INITIALIZE_USER_SECTIONS - .extern InitializeUserMemorySections -#endif - - .section .init, "ax" - .code 16 - .balign 2 - .thumb_func - -_start: - /* Set up main stack if size > 0 */ - ldr r1, =__stack_end__ - ldr r0, =__stack_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - mov sp, r1 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - ldr r0, =__stack_start__ - bl memory_set -#endif -1: - - /* Set up process stack if size > 0 */ - ldr r1, =__stack_process_end__ - ldr r0, =__stack_process_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - msr psp, r1 - movs r2, #2 - msr control, r2 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - bl memory_set -#endif -1: - - /* Copy initialized memory sections into RAM (if necessary). */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl memory_copy - ldr r0, =__tdata_load_start__ - ldr r1, =__tdata_start__ - ldr r2, =__tdata_end__ - bl memory_copy -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__data2_load_start__ - ldr r1, =__data2_start__ - ldr r2, =__data2_end__ - bl memory_copy - ldr r0, =__text2_load_start__ - ldr r1, =__text2_start__ - ldr r2, =__text2_end__ - bl memory_copy - ldr r0, =__rodata2_load_start__ - ldr r1, =__rodata2_start__ - ldr r2, =__rodata2_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__data_tcm_load_start__ - ldr r1, =__data_tcm_start__ - ldr r2, =__data_tcm_end__ - bl memory_copy - ldr r0, =__text_tcm_load_start__ - ldr r1, =__text_tcm_start__ - ldr r2, =__text_tcm_end__ - bl memory_copy - ldr r0, =__rodata_tcm_load_start__ - ldr r1, =__rodata_tcm_start__ - ldr r2, =__rodata_tcm_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Zero the bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - movs r2, #0 - bl memory_set - ldr r0, =__tbss_start__ - ldr r1, =__tbss_end__ - movs r2, #0 - bl memory_set -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__bss2_start__ - ldr r1, =__bss2_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__bss_tcm_start__ - ldr r1, =__bss_tcm_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Initialize the heap */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - subs r1, r1, r0 - cmp r1, #8 - blt 1f - movs r2, #0 - str r2, [r0] - adds r0, r0, #4 - str r1, [r0] -1: - -#ifdef INITIALIZE_USER_SECTIONS - ldr r2, =InitializeUserMemorySections - blx r2 -#endif - - /* Call constructors */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -ctor_loop: - cmp r0, r1 - beq ctor_end - ldr r2, [r0] - adds r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b ctor_loop -ctor_end: - - /* Setup initial call frame */ - movs r0, #0 - mov lr, r0 - mov r12, sp - - .type start, function -start: - /* Jump to application entry point */ -#ifdef FULL_LIBRARY - movs r0, #ARGSSPACE - ldr r1, =args - ldr r2, =debug_getargs - blx r2 - ldr r1, =args -#else - movs r0, #0 - movs r1, #0 -#endif - ldr r2, =APP_ENTRY_POINT - blx r2 - - .thumb_func -exit: -#ifdef FULL_LIBRARY - mov r5, r0 // save the exit parameter/return result - - /* Call destructors */ - ldr r0, =__dtors_start__ - ldr r1, =__dtors_end__ -dtor_loop: - cmp r0, r1 - beq dtor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b dtor_loop -dtor_end: - - /* Call atexit functions */ - ldr r2, =_execute_at_exit_fns - blx r2 - - /* Call debug_exit with return result/exit parameter */ - mov r0, r5 - ldr r2, =debug_exit - blx r2 -#endif - - /* Returned from application entry point, loop forever. */ -exit_loop: - b exit_loop - - .thumb_func -memory_copy: - cmp r0, r1 - beq 2f - subs r2, r2, r1 - beq 2f -1: - ldrb r3, [r0] - adds r0, r0, #1 - strb r3, [r1] - adds r1, r1, #1 - subs r2, r2, #1 - bne 1b -2: - bx lr - - .thumb_func -memory_set: - cmp r0, r1 - beq 1f - strb r2, [r0] - adds r0, r0, #1 - b memory_set -1: - bx lr - - // default C/C++ library helpers - -.macro HELPER helper_name - .section .text.\helper_name, "ax", %progbits - .balign 2 - .global \helper_name - .weak \helper_name -\helper_name: - .thumb_func -.endm - -.macro JUMPTO name -#if defined(__thumb__) && !defined(__thumb2__) - mov r12, r0 - ldr r0, =\name - push {r0} - mov r0, r12 - pop {pc} -#else - b \name -#endif -.endm - -HELPER __aeabi_read_tp - ldr r0, =__tbss_start__-8 - bx lr -HELPER abort - b . -HELPER __assert - b . -HELPER __aeabi_assert - b . -HELPER __sync_synchronize - bx lr -HELPER __getchar - JUMPTO debug_getchar -HELPER __putchar - JUMPTO debug_putchar -HELPER __open - JUMPTO debug_fopen -HELPER __close - JUMPTO debug_fclose -HELPER __write - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fwrite -HELPER __read - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fread -HELPER __seek - push {r4, lr} - mov r4, r0 - bl debug_fseek - cmp r0, #0 - bne 1f - mov r0, r4 - bl debug_ftell - pop {r4, pc} -1: - ldr r0, =-1 - pop {r4, pc} - // char __user_locale_name_buffer[]; - .section .bss.__user_locale_name_buffer, "aw", %nobits - .global __user_locale_name_buffer - .weak __user_locale_name_buffer - __user_locale_name_buffer: - .word 0x0 - -#ifdef FULL_LIBRARY - .bss -args: - .space ARGSSPACE -#endif - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - diff --git a/examples/device/cdc_msc/ses/lpc43xx/LPC4300_Startup.s b/examples/device/cdc_msc/ses/lpc43xx/LPC4300_Startup.s deleted file mode 100644 index 3df2ad96..00000000 --- a/examples/device/cdc_msc/ses/lpc43xx/LPC4300_Startup.s +++ /dev/null @@ -1,126 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * NO_FPU_ENABLE * - * * - * If defined, FPU will not be enabled. * - * * - * NO_STACK_INIT * - * * - * If defined, the stack pointer will not be initialised. * - * * - * NO_SYSTEM_INIT * - * * - * If defined, the SystemInit() function will not be called. By default * - * SystemInit() is called after reset to enable the clocks and memories to * - * be initialised prior to any C startup initialisation. * - * * - * NO_VTOR_CONFIG * - * * - * If defined, the vector table offset register will not be configured. * - * * - * MEMORY_INIT * - * * - * If defined, the MemoryInit() function will be called. By default * - * MemoryInit() is called after SystemInit() to enable an external memory * - * controller. * - * * - * STACK_INIT_VAL * - * * - * If defined, specifies the initial stack pointer value. If undefined, * - * the stack pointer will be initialised to point to the end of the * - * RAM segment. * - * * - * VECTORS_IN_RAM * - * * - * If defined, the exception vectors will be copied from Flash to RAM. * - * * - *****************************************************************************/ - - .syntax unified - - .global Reset_Handler - .extern _vectors - - .section .init, "ax" - .thumb_func - - .equ VTOR_REG, 0xE000ED08 - .equ FPU_CPACR_REG, 0xE000ED88 - -#ifndef STACK_INIT_VAL -#define STACK_INIT_VAL __RAM_segment_end__ -#endif - -Reset_Handler: -#ifndef NO_STACK_INIT - /* Initialise main stack */ - ldr r0, =STACK_INIT_VAL - ldr r1, =0x7 - bics r0, r1 - mov sp, r0 -#endif - -#ifndef NO_SYSTEM_INIT - /* Initialise system */ - ldr r0, =SystemInit - blx r0 -#endif - -#ifdef MEMORY_INIT - ldr r0, =MemoryInit - blx r0 -#endif - -#ifdef VECTORS_IN_RAM - /* Copy exception vectors into RAM */ - ldr r0, =__vectors_start__ - ldr r1, =__vectors_end__ - ldr r2, =__vectors_ram_start__ -1: - cmp r0, r1 - beq 2f - ldr r3, [r0] - str r3, [r2] - adds r0, r0, #4 - adds r2, r2, #4 - b 1b -2: -#endif - -#ifndef NO_VTOR_CONFIG - /* Configure vector table offset register */ - ldr r0, =VTOR_REG -#ifdef VECTORS_IN_RAM - ldr r1, =_vectors_ram -#else - ldr r1, =_vectors -#endif - str r1, [r0] -#endif - -#if (defined(__ARM_ARCH_FPV4_SP_D16__) || defined(__ARM_ARCH_FPV5_D16__)) && !defined(NO_FPU_ENABLE) - /* Enable FPU */ - ldr r0, =FPU_CPACR_REG - ldr r1, [r0] - orr r1, r1, #(0xF << 20) - str r1, [r0] - dsb - isb -#endif - - /* Jump to program start */ - b _start - - diff --git a/examples/device/cdc_msc/ses/lpc43xx/LPC4300_Target.js b/examples/device/cdc_msc/ses/lpc43xx/LPC4300_Target.js deleted file mode 100644 index 20560af4..00000000 --- a/examples/device/cdc_msc/ses/lpc43xx/LPC4300_Target.js +++ /dev/null @@ -1,19 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -function Reset() { - TargetInterface.resetAndStop(); -} - -function EnableTrace(traceInterfaceType) { - // TODO: Enable trace -} - diff --git a/examples/device/cdc_msc/ses/lpc43xx/LPC4357 Cortex-M4_MemoryMap.xml b/examples/device/cdc_msc/ses/lpc43xx/LPC4357 Cortex-M4_MemoryMap.xml deleted file mode 100644 index eb42b7bf..00000000 --- a/examples/device/cdc_msc/ses/lpc43xx/LPC4357 Cortex-M4_MemoryMap.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc43xx/LPC43xx_Registers.xml b/examples/device/cdc_msc/ses/lpc43xx/LPC43xx_Registers.xml deleted file mode 100644 index 9c094646..00000000 --- a/examples/device/cdc_msc/ses/lpc43xx/LPC43xx_Registers.xml +++ /dev/null @@ -1,33526 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc43xx/LPC43xx_Vectors.s b/examples/device/cdc_msc/ses/lpc43xx/LPC43xx_Vectors.s deleted file mode 100644 index ab223b8a..00000000 --- a/examples/device/cdc_msc/ses/lpc43xx/LPC43xx_Vectors.s +++ /dev/null @@ -1,540 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * VECTORS_IN_RAM * - * * - * If defined, an area of RAM will large enough to store the vector table * - * will be reserved. * - * * - *****************************************************************************/ - - .syntax unified - .code 16 - - .section .init, "ax" - .align 0 - -/***************************************************************************** - * Default Exception Handlers * - *****************************************************************************/ - - .thumb_func - .weak NMI_Handler -NMI_Handler: - b . - - .thumb_func - .weak HardFault_Handler -HardFault_Handler: - b . - - .thumb_func - .weak SVC_Handler -SVC_Handler: - b . - - .thumb_func - .weak PendSV_Handler -PendSV_Handler: - b . - - .thumb_func - .weak SysTick_Handler -SysTick_Handler: - b . - - .thumb_func -Dummy_Handler: - b . - -#if defined(__OPTIMIZATION_SMALL) - - .weak DAC_IRQHandler - .thumb_set DAC_IRQHandler,Dummy_Handler - - .weak DMA_IRQHandler - .thumb_set DMA_IRQHandler,Dummy_Handler - - .weak FLASH_IRQHandler - .thumb_set FLASH_IRQHandler,Dummy_Handler - - .weak ETHERNET_IRQHandler - .thumb_set ETHERNET_IRQHandler,Dummy_Handler - - .weak SDIO_IRQHandler - .thumb_set SDIO_IRQHandler,Dummy_Handler - - .weak LCD_IRQHandler - .thumb_set LCD_IRQHandler,Dummy_Handler - - .weak USB0_IRQHandler - .thumb_set USB0_IRQHandler,Dummy_Handler - - .weak USB1_IRQHandler - .thumb_set USB1_IRQHandler,Dummy_Handler - - .weak SCT_IRQHandler - .thumb_set SCT_IRQHandler,Dummy_Handler - - .weak RITIMER_IRQHandler - .thumb_set RITIMER_IRQHandler,Dummy_Handler - - .weak TIMER0_IRQHandler - .thumb_set TIMER0_IRQHandler,Dummy_Handler - - .weak TIMER1_IRQHandler - .thumb_set TIMER1_IRQHandler,Dummy_Handler - - .weak TIMER2_IRQHandler - .thumb_set TIMER2_IRQHandler,Dummy_Handler - - .weak TIMER3_IRQHandler - .thumb_set TIMER3_IRQHandler,Dummy_Handler - - .weak MCPWM_IRQHandler - .thumb_set MCPWM_IRQHandler,Dummy_Handler - - .weak ADC0_IRQHandler - .thumb_set ADC0_IRQHandler,Dummy_Handler - - .weak I2C0_IRQHandler - .thumb_set I2C0_IRQHandler,Dummy_Handler - - .weak I2C1_IRQHandler - .thumb_set I2C1_IRQHandler,Dummy_Handler - - .weak SPI_INT_IRQHandler - .thumb_set SPI_INT_IRQHandler,Dummy_Handler - - .weak ADC1_IRQHandler - .thumb_set ADC1_IRQHandler,Dummy_Handler - - .weak SSP0_IRQHandler - .thumb_set SSP0_IRQHandler,Dummy_Handler - - .weak SSP1_IRQHandler - .thumb_set SSP1_IRQHandler,Dummy_Handler - - .weak USART0_IRQHandler - .thumb_set USART0_IRQHandler,Dummy_Handler - - .weak UART1_IRQHandler - .thumb_set UART1_IRQHandler,Dummy_Handler - - .weak USART2_IRQHandler - .thumb_set USART2_IRQHandler,Dummy_Handler - - .weak USART3_IRQHandler - .thumb_set USART3_IRQHandler,Dummy_Handler - - .weak I2S0_IRQHandler - .thumb_set I2S0_IRQHandler,Dummy_Handler - - .weak I2S1_IRQHandler - .thumb_set I2S1_IRQHandler,Dummy_Handler - - .weak SPIFI_IRQHandler - .thumb_set SPIFI_IRQHandler,Dummy_Handler - - .weak SGPIO_IINT_IRQHandler - .thumb_set SGPIO_IINT_IRQHandler,Dummy_Handler - - .weak PIN_INT0_IRQHandler - .thumb_set PIN_INT0_IRQHandler,Dummy_Handler - - .weak PIN_INT1_IRQHandler - .thumb_set PIN_INT1_IRQHandler,Dummy_Handler - - .weak PIN_INT2_IRQHandler - .thumb_set PIN_INT2_IRQHandler,Dummy_Handler - - .weak PIN_INT3_IRQHandler - .thumb_set PIN_INT3_IRQHandler,Dummy_Handler - - .weak PIN_INT4_IRQHandler - .thumb_set PIN_INT4_IRQHandler,Dummy_Handler - - .weak PIN_INT5_IRQHandler - .thumb_set PIN_INT5_IRQHandler,Dummy_Handler - - .weak PIN_INT6_IRQHandler - .thumb_set PIN_INT6_IRQHandler,Dummy_Handler - - .weak PIN_INT7_IRQHandler - .thumb_set PIN_INT7_IRQHandler,Dummy_Handler - - .weak GINT0_IRQHandler - .thumb_set GINT0_IRQHandler,Dummy_Handler - - .weak GINT1_IRQHandler - .thumb_set GINT1_IRQHandler,Dummy_Handler - - .weak EVENTROUTER_IRQHandler - .thumb_set EVENTROUTER_IRQHandler,Dummy_Handler - - .weak C_CAN1_IRQHandler - .thumb_set C_CAN1_IRQHandler,Dummy_Handler - - .weak ADCHS_IRQHandler - .thumb_set ADCHS_IRQHandler,Dummy_Handler - - .weak ATIMER_IRQHandler - .thumb_set ATIMER_IRQHandler,Dummy_Handler - - .weak RTC_IRQHandler - .thumb_set RTC_IRQHandler,Dummy_Handler - - .weak WWDT_IRQHandler - .thumb_set WWDT_IRQHandler,Dummy_Handler - - .weak C_CAN0_IRQHandler - .thumb_set C_CAN0_IRQHandler,Dummy_Handler - - .weak QEI_IRQHandler - .thumb_set QEI_IRQHandler,Dummy_Handler - -#else - - .thumb_func - .weak DAC_IRQHandler -DAC_IRQHandler: - b . - - .thumb_func - .weak DMA_IRQHandler -DMA_IRQHandler: - b . - - .thumb_func - .weak FLASH_IRQHandler -FLASH_IRQHandler: - b . - - .thumb_func - .weak ETHERNET_IRQHandler -ETHERNET_IRQHandler: - b . - - .thumb_func - .weak SDIO_IRQHandler -SDIO_IRQHandler: - b . - - .thumb_func - .weak LCD_IRQHandler -LCD_IRQHandler: - b . - - .thumb_func - .weak USB0_IRQHandler -USB0_IRQHandler: - b . - - .thumb_func - .weak USB1_IRQHandler -USB1_IRQHandler: - b . - - .thumb_func - .weak SCT_IRQHandler -SCT_IRQHandler: - b . - - .thumb_func - .weak RITIMER_IRQHandler -RITIMER_IRQHandler: - b . - - .thumb_func - .weak TIMER0_IRQHandler -TIMER0_IRQHandler: - b . - - .thumb_func - .weak TIMER1_IRQHandler -TIMER1_IRQHandler: - b . - - .thumb_func - .weak TIMER2_IRQHandler -TIMER2_IRQHandler: - b . - - .thumb_func - .weak TIMER3_IRQHandler -TIMER3_IRQHandler: - b . - - .thumb_func - .weak MCPWM_IRQHandler -MCPWM_IRQHandler: - b . - - .thumb_func - .weak ADC0_IRQHandler -ADC0_IRQHandler: - b . - - .thumb_func - .weak I2C0_IRQHandler -I2C0_IRQHandler: - b . - - .thumb_func - .weak I2C1_IRQHandler -I2C1_IRQHandler: - b . - - .thumb_func - .weak SPI_INT_IRQHandler -SPI_INT_IRQHandler: - b . - - .thumb_func - .weak ADC1_IRQHandler -ADC1_IRQHandler: - b . - - .thumb_func - .weak SSP0_IRQHandler -SSP0_IRQHandler: - b . - - .thumb_func - .weak SSP1_IRQHandler -SSP1_IRQHandler: - b . - - .thumb_func - .weak USART0_IRQHandler -USART0_IRQHandler: - b . - - .thumb_func - .weak UART1_IRQHandler -UART1_IRQHandler: - b . - - .thumb_func - .weak USART2_IRQHandler -USART2_IRQHandler: - b . - - .thumb_func - .weak USART3_IRQHandler -USART3_IRQHandler: - b . - - .thumb_func - .weak I2S0_IRQHandler -I2S0_IRQHandler: - b . - - .thumb_func - .weak I2S1_IRQHandler -I2S1_IRQHandler: - b . - - .thumb_func - .weak SPIFI_IRQHandler -SPIFI_IRQHandler: - b . - - .thumb_func - .weak SGPIO_IINT_IRQHandler -SGPIO_IINT_IRQHandler: - b . - - .thumb_func - .weak PIN_INT0_IRQHandler -PIN_INT0_IRQHandler: - b . - - .thumb_func - .weak PIN_INT1_IRQHandler -PIN_INT1_IRQHandler: - b . - - .thumb_func - .weak PIN_INT2_IRQHandler -PIN_INT2_IRQHandler: - b . - - .thumb_func - .weak PIN_INT3_IRQHandler -PIN_INT3_IRQHandler: - b . - - .thumb_func - .weak PIN_INT4_IRQHandler -PIN_INT4_IRQHandler: - b . - - .thumb_func - .weak PIN_INT5_IRQHandler -PIN_INT5_IRQHandler: - b . - - .thumb_func - .weak PIN_INT6_IRQHandler -PIN_INT6_IRQHandler: - b . - - .thumb_func - .weak PIN_INT7_IRQHandler -PIN_INT7_IRQHandler: - b . - - .thumb_func - .weak GINT0_IRQHandler -GINT0_IRQHandler: - b . - - .thumb_func - .weak GINT1_IRQHandler -GINT1_IRQHandler: - b . - - .thumb_func - .weak EVENTROUTER_IRQHandler -EVENTROUTER_IRQHandler: - b . - - .thumb_func - .weak C_CAN1_IRQHandler -C_CAN1_IRQHandler: - b . - - .thumb_func - .weak ADCHS_IRQHandler -ADCHS_IRQHandler: - b . - - .thumb_func - .weak ATIMER_IRQHandler -ATIMER_IRQHandler: - b . - - .thumb_func - .weak RTC_IRQHandler -RTC_IRQHandler: - b . - - .thumb_func - .weak WWDT_IRQHandler -WWDT_IRQHandler: - b . - - .thumb_func - .weak C_CAN0_IRQHandler -C_CAN0_IRQHandler: - b . - - .thumb_func - .weak QEI_IRQHandler -QEI_IRQHandler: - b . - -#endif - -/***************************************************************************** - * Vector Table * - *****************************************************************************/ - - .section .vectors, "ax" - .align 0 - .global _vectors - .extern __stack_end__ - .extern Reset_Handler - -_vectors: - .word __stack_end__ - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word SVC_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word PendSV_Handler - .word SysTick_Handler - .word DAC_IRQHandler - .word Dummy_Handler /* Reserved */ - .word DMA_IRQHandler - .word Dummy_Handler /* Reserved */ - .word FLASH_IRQHandler - .word ETHERNET_IRQHandler - .word SDIO_IRQHandler - .word LCD_IRQHandler - .word USB0_IRQHandler - .word USB1_IRQHandler - .word SCT_IRQHandler - .word RITIMER_IRQHandler - .word TIMER0_IRQHandler - .word TIMER1_IRQHandler - .word TIMER2_IRQHandler - .word TIMER3_IRQHandler - .word MCPWM_IRQHandler - .word ADC0_IRQHandler - .word I2C0_IRQHandler - .word I2C1_IRQHandler - .word SPI_INT_IRQHandler - .word ADC1_IRQHandler - .word SSP0_IRQHandler - .word SSP1_IRQHandler - .word USART0_IRQHandler - .word UART1_IRQHandler - .word USART2_IRQHandler - .word USART3_IRQHandler - .word I2S0_IRQHandler - .word I2S1_IRQHandler - .word SPIFI_IRQHandler - .word SGPIO_IINT_IRQHandler - .word PIN_INT0_IRQHandler - .word PIN_INT1_IRQHandler - .word PIN_INT2_IRQHandler - .word PIN_INT3_IRQHandler - .word PIN_INT4_IRQHandler - .word PIN_INT5_IRQHandler - .word PIN_INT6_IRQHandler - .word PIN_INT7_IRQHandler - .word GINT0_IRQHandler - .word GINT1_IRQHandler - .word EVENTROUTER_IRQHandler - .word C_CAN1_IRQHandler - .word Dummy_Handler /* Reserved */ - .word ADCHS_IRQHandler - .word ATIMER_IRQHandler - .word RTC_IRQHandler - .word Dummy_Handler /* Reserved */ - .word WWDT_IRQHandler - .word Dummy_Handler /* Reserved */ - .word C_CAN0_IRQHandler - .word QEI_IRQHandler -_vectors_end: - -#ifdef VECTORS_IN_RAM - .section .vectors_ram, "ax" - .align 0 - .global _vectors_ram - -_vectors_ram: - .space _vectors_end - _vectors, 0 -#endif diff --git a/examples/device/cdc_msc/ses/lpc43xx/flash_placement.xml b/examples/device/cdc_msc/ses/lpc43xx/flash_placement.xml deleted file mode 100644 index 79bedc53..00000000 --- a/examples/device/cdc_msc/ses/lpc43xx/flash_placement.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc43xx/lpc43xx.emProject b/examples/device/cdc_msc/ses/lpc43xx/lpc43xx.emProject deleted file mode 100644 index f751a432..00000000 --- a/examples/device/cdc_msc/ses/lpc43xx/lpc43xx.emProject +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/lpc43xx/thumb_crt0.s b/examples/device/cdc_msc/ses/lpc43xx/thumb_crt0.s deleted file mode 100644 index 17f88e0c..00000000 --- a/examples/device/cdc_msc/ses/lpc43xx/thumb_crt0.s +++ /dev/null @@ -1,415 +0,0 @@ -// ********************************************************************** -// * SEGGER Microcontroller GmbH * -// * The Embedded Experts * -// ********************************************************************** -// * * -// * (c) 2014 - 2018 SEGGER Microcontroller GmbH * -// * (c) 2001 - 2018 Rowley Associates Limited * -// * * -// * www.segger.com Support: support@segger.com * -// * * -// ********************************************************************** -// * * -// * All rights reserved. * -// * * -// * Redistribution and use in source and binary forms, with or * -// * without modification, are permitted provided that the following * -// * conditions are met: * -// * * -// * - Redistributions of source code must retain the above copyright * -// * notice, this list of conditions and the following disclaimer. * -// * * -// * - Neither the name of SEGGER Microcontroller GmbH * -// * nor the names of its contributors may be used to endorse or * -// * promote products derived from this software without specific * -// * prior written permission. * -// * * -// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -// * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -// * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -// * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -// * DISCLAIMED. * -// * IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -// * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -// * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -// * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -// * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -// * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -// * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -// * DAMAGE. * -// * * -// ********************************************************************** -// -// -// Preprocessor Definitions -// ------------------------ -// APP_ENTRY_POINT -// -// Defines the application entry point function, if undefined this setting -// defaults to "main". -// -// INITIALIZE_STACK -// -// If defined, the contents of the stack will be initialized to a the -// value 0xCC. -// -// INITIALIZE_SECONDARY_SECTIONS -// -// If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized. -// -// INITIALIZE_TCM_SECTIONS -// -// If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections -// will be initialized. -// -// INITIALIZE_USER_SECTIONS -// -// If defined, the function InitializeUserMemorySections will be called prior -// to entering main in order to allow the user to initialize any user defined -// memory sections. -// -// FULL_LIBRARY -// -// If defined then -// - argc, argv are setup by the debug_getargs. -// - the exit symbol is defined and executes on return from main. -// - the exit symbol calls destructors, atexit functions and then debug_exit. -// -// If not defined then -// - argc and argv are zero. -// - the exit symbol is defined, executes on return from main and loops -// - -#ifndef APP_ENTRY_POINT -#define APP_ENTRY_POINT main -#endif - -#ifndef ARGSSPACE -#define ARGSSPACE 128 -#endif - .syntax unified - - .global _start - .extern APP_ENTRY_POINT - .global exit - .weak exit - -#ifdef INITIALIZE_USER_SECTIONS - .extern InitializeUserMemorySections -#endif - - .section .init, "ax" - .code 16 - .balign 2 - .thumb_func - -_start: - /* Set up main stack if size > 0 */ - ldr r1, =__stack_end__ - ldr r0, =__stack_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - mov sp, r1 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - ldr r0, =__stack_start__ - bl memory_set -#endif -1: - - /* Set up process stack if size > 0 */ - ldr r1, =__stack_process_end__ - ldr r0, =__stack_process_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - msr psp, r1 - movs r2, #2 - msr control, r2 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - bl memory_set -#endif -1: - - /* Copy initialized memory sections into RAM (if necessary). */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl memory_copy - ldr r0, =__tdata_load_start__ - ldr r1, =__tdata_start__ - ldr r2, =__tdata_end__ - bl memory_copy -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__data2_load_start__ - ldr r1, =__data2_start__ - ldr r2, =__data2_end__ - bl memory_copy - ldr r0, =__text2_load_start__ - ldr r1, =__text2_start__ - ldr r2, =__text2_end__ - bl memory_copy - ldr r0, =__rodata2_load_start__ - ldr r1, =__rodata2_start__ - ldr r2, =__rodata2_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__data_tcm_load_start__ - ldr r1, =__data_tcm_start__ - ldr r2, =__data_tcm_end__ - bl memory_copy - ldr r0, =__text_tcm_load_start__ - ldr r1, =__text_tcm_start__ - ldr r2, =__text_tcm_end__ - bl memory_copy - ldr r0, =__rodata_tcm_load_start__ - ldr r1, =__rodata_tcm_start__ - ldr r2, =__rodata_tcm_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Zero the bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - movs r2, #0 - bl memory_set - ldr r0, =__tbss_start__ - ldr r1, =__tbss_end__ - movs r2, #0 - bl memory_set -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__bss2_start__ - ldr r1, =__bss2_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__bss_tcm_start__ - ldr r1, =__bss_tcm_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Initialize the heap */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - subs r1, r1, r0 - cmp r1, #8 - blt 1f - movs r2, #0 - str r2, [r0] - adds r0, r0, #4 - str r1, [r0] -1: - -#ifdef INITIALIZE_USER_SECTIONS - ldr r2, =InitializeUserMemorySections - blx r2 -#endif - - /* Call constructors */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -ctor_loop: - cmp r0, r1 - beq ctor_end - ldr r2, [r0] - adds r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b ctor_loop -ctor_end: - - /* Setup initial call frame */ - movs r0, #0 - mov lr, r0 - mov r12, sp - - .type start, function -start: - /* Jump to application entry point */ -#ifdef FULL_LIBRARY - movs r0, #ARGSSPACE - ldr r1, =args - ldr r2, =debug_getargs - blx r2 - ldr r1, =args -#else - movs r0, #0 - movs r1, #0 -#endif - ldr r2, =APP_ENTRY_POINT - blx r2 - - .thumb_func -exit: -#ifdef FULL_LIBRARY - mov r5, r0 // save the exit parameter/return result - - /* Call destructors */ - ldr r0, =__dtors_start__ - ldr r1, =__dtors_end__ -dtor_loop: - cmp r0, r1 - beq dtor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b dtor_loop -dtor_end: - - /* Call atexit functions */ - ldr r2, =_execute_at_exit_fns - blx r2 - - /* Call debug_exit with return result/exit parameter */ - mov r0, r5 - ldr r2, =debug_exit - blx r2 -#endif - - /* Returned from application entry point, loop forever. */ -exit_loop: - b exit_loop - - .thumb_func -memory_copy: - cmp r0, r1 - beq 2f - subs r2, r2, r1 - beq 2f -1: - ldrb r3, [r0] - adds r0, r0, #1 - strb r3, [r1] - adds r1, r1, #1 - subs r2, r2, #1 - bne 1b -2: - bx lr - - .thumb_func -memory_set: - cmp r0, r1 - beq 1f - strb r2, [r0] - adds r0, r0, #1 - b memory_set -1: - bx lr - - // default C/C++ library helpers - -.macro HELPER helper_name - .section .text.\helper_name, "ax", %progbits - .balign 2 - .global \helper_name - .weak \helper_name -\helper_name: - .thumb_func -.endm - -.macro JUMPTO name -#if defined(__thumb__) && !defined(__thumb2__) - mov r12, r0 - ldr r0, =\name - push {r0} - mov r0, r12 - pop {pc} -#else - b \name -#endif -.endm - -HELPER __aeabi_read_tp - ldr r0, =__tbss_start__-8 - bx lr -HELPER abort - b . -HELPER __assert - b . -HELPER __aeabi_assert - b . -HELPER __sync_synchronize - bx lr -HELPER __getchar - JUMPTO debug_getchar -HELPER __putchar - JUMPTO debug_putchar -HELPER __open - JUMPTO debug_fopen -HELPER __close - JUMPTO debug_fclose -HELPER __write - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fwrite -HELPER __read - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fread -HELPER __seek - push {r4, lr} - mov r4, r0 - bl debug_fseek - cmp r0, #0 - bne 1f - mov r0, r4 - bl debug_ftell - pop {r4, pc} -1: - ldr r0, =-1 - pop {r4, pc} - // char __user_locale_name_buffer[]; - .section .bss.__user_locale_name_buffer, "aw", %nobits - .global __user_locale_name_buffer - .weak __user_locale_name_buffer - __user_locale_name_buffer: - .word 0x0 - -#ifdef FULL_LIBRARY - .bss -args: - .space ARGSSPACE -#endif - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - diff --git a/examples/device/cdc_msc/ses/nrf5x/flash_placement.xml b/examples/device/cdc_msc/ses/nrf5x/flash_placement.xml deleted file mode 100644 index 951d2371..00000000 --- a/examples/device/cdc_msc/ses/nrf5x/flash_placement.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/nrf5x/nRF52840_xxAA_MemoryMap.xml b/examples/device/cdc_msc/ses/nrf5x/nRF52840_xxAA_MemoryMap.xml deleted file mode 100644 index cc4056c0..00000000 --- a/examples/device/cdc_msc/ses/nrf5x/nRF52840_xxAA_MemoryMap.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/examples/device/cdc_msc/ses/nrf5x/nRF52840_xxAA_s140v6_MemoryMap.xml b/examples/device/cdc_msc/ses/nrf5x/nRF52840_xxAA_s140v6_MemoryMap.xml deleted file mode 100644 index 48aad06a..00000000 --- a/examples/device/cdc_msc/ses/nrf5x/nRF52840_xxAA_s140v6_MemoryMap.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/examples/device/cdc_msc/ses/nrf5x/nRF_Target.js b/examples/device/cdc_msc/ses/nrf5x/nRF_Target.js deleted file mode 100644 index 20560af4..00000000 --- a/examples/device/cdc_msc/ses/nrf5x/nRF_Target.js +++ /dev/null @@ -1,19 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -function Reset() { - TargetInterface.resetAndStop(); -} - -function EnableTrace(traceInterfaceType) { - // TODO: Enable trace -} - diff --git a/examples/device/cdc_msc/ses/nrf5x/nrf52840_Registers.xml b/examples/device/cdc_msc/ses/nrf5x/nrf52840_Registers.xml deleted file mode 100644 index 39f861f9..00000000 --- a/examples/device/cdc_msc/ses/nrf5x/nrf52840_Registers.xml +++ /dev/null @@ -1,22310 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/nrf5x/nrf5x.emProject b/examples/device/cdc_msc/ses/nrf5x/nrf5x.emProject deleted file mode 100644 index 94419913..00000000 --- a/examples/device/cdc_msc/ses/nrf5x/nrf5x.emProject +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/nrf5x/thumb_crt0.s b/examples/device/cdc_msc/ses/nrf5x/thumb_crt0.s deleted file mode 100644 index 71820cb5..00000000 --- a/examples/device/cdc_msc/ses/nrf5x/thumb_crt0.s +++ /dev/null @@ -1,420 +0,0 @@ -// SEGGER Embedded Studio, runtime support. -// -// Copyright (c) 2014-2017 SEGGER Microcontroller GmbH & Co KG -// Copyright (c) 2001-2017 Rowley Associates Limited. -// -// This file may be distributed under the terms of the License Agreement -// provided with this software. -// -// THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// -// Preprocessor Definitions -// ------------------------ -// APP_ENTRY_POINT -// -// Defines the application entry point function, if undefined this setting -// defaults to "main". -// -// INITIALIZE_STACK -// -// If defined, the contents of the stack will be initialized to a the -// value 0xCC. -// -// INITIALIZE_SECONDARY_SECTIONS -// -// If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized. -// -// INITIALIZE_TCM_SECTIONS -// -// If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections -// will be initialized. -// -// INITIALIZE_USER_SECTIONS -// -// If defined, the function InitializeUserMemorySections will be called prior -// to entering main in order to allow the user to initialize any user defined -// memory sections. -// -// FULL_LIBRARY -// -// If defined then -// - argc, argv are setup by the debug_getargs. -// - the exit symbol is defined and executes on return from main. -// - the exit symbol calls destructors, atexit functions and then debug_exit. -// -// If not defined then -// - argc and argv are zero. -// - the exit symbol is defined, executes on return from main and loops -// - -#ifndef APP_ENTRY_POINT -#define APP_ENTRY_POINT main -#endif - -#ifndef ARGSSPACE -#define ARGSSPACE 128 -#endif - .syntax unified - - .global _start - .extern APP_ENTRY_POINT - .global exit - .weak exit - -#ifdef INITIALIZE_USER_SECTIONS - .extern InitializeUserMemorySections -#endif - - .section .init, "ax" - .code 16 - .align 2 - .thumb_func - -_start: - /* Set up main stack if size > 0 */ - ldr r1, =__stack_end__ - ldr r0, =__stack_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - mov sp, r1 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - ldr r0, =__stack_start__ - bl memory_set -#endif -1: - - /* Set up process stack if size > 0 */ - ldr r1, =__stack_process_end__ - ldr r0, =__stack_process_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - msr psp, r1 - movs r2, #2 - msr control, r2 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - bl memory_set -#endif -1: - - /* Copy initialized memory sections into RAM (if necessary). */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl memory_copy - ldr r0, =__tdata_load_start__ - ldr r1, =__tdata_start__ - ldr r2, =__tdata_end__ - bl memory_copy -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__data2_load_start__ - ldr r1, =__data2_start__ - ldr r2, =__data2_end__ - bl memory_copy - ldr r0, =__text2_load_start__ - ldr r1, =__text2_start__ - ldr r2, =__text2_end__ - bl memory_copy - ldr r0, =__rodata2_load_start__ - ldr r1, =__rodata2_start__ - ldr r2, =__rodata2_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__data_tcm_load_start__ - ldr r1, =__data_tcm_start__ - ldr r2, =__data_tcm_end__ - bl memory_copy - ldr r0, =__text_tcm_load_start__ - ldr r1, =__text_tcm_start__ - ldr r2, =__text_tcm_end__ - bl memory_copy - ldr r0, =__rodata_tcm_load_start__ - ldr r1, =__rodata_tcm_start__ - ldr r2, =__rodata_tcm_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Zero the bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - movs r2, #0 - bl memory_set - ldr r0, =__tbss_start__ - ldr r1, =__tbss_end__ - movs r2, #0 - bl memory_set -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__bss2_start__ - ldr r1, =__bss2_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__bss_tcm_start__ - ldr r1, =__bss_tcm_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Initialize the heap */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - subs r1, r1, r0 - cmp r1, #8 - blt 1f - movs r2, #0 - str r2, [r0] - adds r0, r0, #4 - str r1, [r0] -1: - -#ifdef INITIALIZE_USER_SECTIONS - ldr r2, =InitializeUserMemorySections - blx r2 -#endif - - /* Call constructors */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -ctor_loop: - cmp r0, r1 - beq ctor_end - ldr r2, [r0] - adds r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b ctor_loop -ctor_end: - - /* Setup initial call frame */ - movs r0, #0 - mov lr, r0 - mov r12, sp - - .type start, function -start: - /* Jump to application entry point */ -#ifdef FULL_LIBRARY - movs r0, #ARGSSPACE - ldr r1, =args - ldr r2, =debug_getargs - blx r2 - ldr r1, =args -#else - movs r0, #0 - movs r1, #0 -#endif - ldr r2, =APP_ENTRY_POINT - blx r2 - - .thumb_func -exit: -#ifdef FULL_LIBRARY - mov r5, r0 // save the exit parameter/return result - - /* Call destructors */ - ldr r0, =__dtors_start__ - ldr r1, =__dtors_end__ -dtor_loop: - cmp r0, r1 - beq dtor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b dtor_loop -dtor_end: - - /* Call atexit functions */ - ldr r2, =_execute_at_exit_fns - blx r2 - - /* Call debug_exit with return result/exit parameter */ - mov r0, r5 - ldr r2, =debug_exit - blx r2 -#endif - - /* Returned from application entry point, loop forever. */ -exit_loop: - b exit_loop - - .thumb_func -memory_copy: - cmp r0, r1 - beq 2f - subs r2, r2, r1 - beq 2f -1: - ldrb r3, [r0] - adds r0, r0, #1 - strb r3, [r1] - adds r1, r1, #1 - subs r2, r2, #1 - bne 1b -2: - bx lr - - .thumb_func -memory_set: - cmp r0, r1 - beq 1f - strb r2, [r0] - adds r0, r0, #1 - b memory_set -1: - bx lr - - // default C/C++ library helpers - -.macro HELPER helper_name - .section .text.\helper_name, "ax", %progbits - .global \helper_name - .weak \helper_name -\helper_name: - .thumb_func -.endm - -.macro JUMPTO name -#if defined(__thumb__) && !defined(__thumb2__) - mov r12, r0 - ldr r0, =\name - push {r0} - mov r0, r12 - pop {pc} -#else - b \name -#endif -.endm - -HELPER __aeabi_read_tp - ldr r0, =__tbss_start__-8 - bx lr -HELPER __heap_lock - bx lr -HELPER __heap_unlock - bx lr -HELPER __printf_lock - bx lr -HELPER __printf_unlock - bx lr -HELPER __scanf_lock - bx lr -HELPER __scanf_unlock - bx lr -HELPER __debug_io_lock - bx lr -HELPER __debug_io_unlock - bx lr -HELPER abort - b . -HELPER __assert - b . -HELPER __aeabi_assert - b . -HELPER __cxa_pure_virtual - b . -HELPER __cxa_guard_acquire - ldr r3, [r0] -#if defined(__thumb__) && !defined(__thumb2__) - movs r0, #1 - tst r3, r0 -#else - tst r3, #1 -#endif - beq 1f - movs r0, #0 - bx lr -1: - movs r0, #1 - bx lr -HELPER __cxa_guard_release - movs r3, #1 - str r3, [r0] - bx lr -HELPER __cxa_guard_abort - bx lr -HELPER __sync_synchronize - bx lr -HELPER __getchar - JUMPTO debug_getchar -HELPER __putchar - JUMPTO debug_putchar -HELPER __open - JUMPTO debug_fopen -HELPER __close - JUMPTO debug_fclose -HELPER __write - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fwrite -HELPER __read - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fread -HELPER __seek - push {r4, lr} - mov r4, r0 - bl debug_fseek - cmp r0, #0 - bne 1f - mov r0, r4 - bl debug_ftell - pop {r4, pc} -1: - ldr r0, =-1 - pop {r4, pc} - // char __user_locale_name_buffer[]; - .section .bss.__user_locale_name_buffer, "aw", %nobits - .global __user_locale_name_buffer - .weak __user_locale_name_buffer - __user_locale_name_buffer: - .word 0x0 - -#ifdef FULL_LIBRARY - .bss -args: - .space ARGSSPACE -#endif - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - diff --git a/examples/device/cdc_msc/ses/samd21/ATSAMD21G18A_MemoryMap.xml b/examples/device/cdc_msc/ses/samd21/ATSAMD21G18A_MemoryMap.xml deleted file mode 100644 index 2143d305..00000000 --- a/examples/device/cdc_msc/ses/samd21/ATSAMD21G18A_MemoryMap.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/examples/device/cdc_msc/ses/samd21/ATSAMD21G18A_Registers.xml b/examples/device/cdc_msc/ses/samd21/ATSAMD21G18A_Registers.xml deleted file mode 100644 index 2e0fa061..00000000 --- a/examples/device/cdc_msc/ses/samd21/ATSAMD21G18A_Registers.xml +++ /dev/null @@ -1,9587 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/samd21/ATSAMD21G18A_Vectors.s b/examples/device/cdc_msc/ses/samd21/ATSAMD21G18A_Vectors.s deleted file mode 100644 index 5cecbd23..00000000 --- a/examples/device/cdc_msc/ses/samd21/ATSAMD21G18A_Vectors.s +++ /dev/null @@ -1,331 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * VECTORS_IN_RAM * - * * - * If defined, an area of RAM will large enough to store the vector table * - * will be reserved. * - * * - *****************************************************************************/ - - .syntax unified - .code 16 - - .section .init, "ax" - .align 0 - -/***************************************************************************** - * Default Exception Handlers * - *****************************************************************************/ - - .thumb_func - .weak NMI_Handler -NMI_Handler: - b . - - .thumb_func - .weak HardFault_Handler -HardFault_Handler: - b . - - .thumb_func - .weak SVC_Handler -SVC_Handler: - b . - - .thumb_func - .weak PendSV_Handler -PendSV_Handler: - b . - - .thumb_func - .weak SysTick_Handler -SysTick_Handler: - b . - - .thumb_func -Dummy_Handler: - b . - -#if defined(__OPTIMIZATION_SMALL) - - .weak PM_Handler - .thumb_set PM_Handler,Dummy_Handler - - .weak SYSCTRL_Handler - .thumb_set SYSCTRL_Handler,Dummy_Handler - - .weak WDT_Handler - .thumb_set WDT_Handler,Dummy_Handler - - .weak RTC_Handler - .thumb_set RTC_Handler,Dummy_Handler - - .weak EIC_Handler - .thumb_set EIC_Handler,Dummy_Handler - - .weak NVMCTRL_Handler - .thumb_set NVMCTRL_Handler,Dummy_Handler - - .weak DMAC_Handler - .thumb_set DMAC_Handler,Dummy_Handler - - .weak USB_Handler - .thumb_set USB_Handler,Dummy_Handler - - .weak EVSYS_Handler - .thumb_set EVSYS_Handler,Dummy_Handler - - .weak SERCOM0_Handler - .thumb_set SERCOM0_Handler,Dummy_Handler - - .weak SERCOM1_Handler - .thumb_set SERCOM1_Handler,Dummy_Handler - - .weak SERCOM2_Handler - .thumb_set SERCOM2_Handler,Dummy_Handler - - .weak SERCOM3_Handler - .thumb_set SERCOM3_Handler,Dummy_Handler - - .weak SERCOM4_Handler - .thumb_set SERCOM4_Handler,Dummy_Handler - - .weak SERCOM5_Handler - .thumb_set SERCOM5_Handler,Dummy_Handler - - .weak TCC0_Handler - .thumb_set TCC0_Handler,Dummy_Handler - - .weak TCC1_Handler - .thumb_set TCC1_Handler,Dummy_Handler - - .weak TCC2_Handler - .thumb_set TCC2_Handler,Dummy_Handler - - .weak TC3_Handler - .thumb_set TC3_Handler,Dummy_Handler - - .weak TC4_Handler - .thumb_set TC4_Handler,Dummy_Handler - - .weak TC5_Handler - .thumb_set TC5_Handler,Dummy_Handler - - .weak ADC_Handler - .thumb_set ADC_Handler,Dummy_Handler - - .weak AC_Handler - .thumb_set AC_Handler,Dummy_Handler - - .weak DAC_Handler - .thumb_set DAC_Handler,Dummy_Handler - - .weak I2S_Handler - .thumb_set I2S_Handler,Dummy_Handler - -#else - - .thumb_func - .weak PM_Handler -PM_Handler: - b . - - .thumb_func - .weak SYSCTRL_Handler -SYSCTRL_Handler: - b . - - .thumb_func - .weak WDT_Handler -WDT_Handler: - b . - - .thumb_func - .weak RTC_Handler -RTC_Handler: - b . - - .thumb_func - .weak EIC_Handler -EIC_Handler: - b . - - .thumb_func - .weak NVMCTRL_Handler -NVMCTRL_Handler: - b . - - .thumb_func - .weak DMAC_Handler -DMAC_Handler: - b . - - .thumb_func - .weak USB_Handler -USB_Handler: - b . - - .thumb_func - .weak EVSYS_Handler -EVSYS_Handler: - b . - - .thumb_func - .weak SERCOM0_Handler -SERCOM0_Handler: - b . - - .thumb_func - .weak SERCOM1_Handler -SERCOM1_Handler: - b . - - .thumb_func - .weak SERCOM2_Handler -SERCOM2_Handler: - b . - - .thumb_func - .weak SERCOM3_Handler -SERCOM3_Handler: - b . - - .thumb_func - .weak SERCOM4_Handler -SERCOM4_Handler: - b . - - .thumb_func - .weak SERCOM5_Handler -SERCOM5_Handler: - b . - - .thumb_func - .weak TCC0_Handler -TCC0_Handler: - b . - - .thumb_func - .weak TCC1_Handler -TCC1_Handler: - b . - - .thumb_func - .weak TCC2_Handler -TCC2_Handler: - b . - - .thumb_func - .weak TC3_Handler -TC3_Handler: - b . - - .thumb_func - .weak TC4_Handler -TC4_Handler: - b . - - .thumb_func - .weak TC5_Handler -TC5_Handler: - b . - - .thumb_func - .weak ADC_Handler -ADC_Handler: - b . - - .thumb_func - .weak AC_Handler -AC_Handler: - b . - - .thumb_func - .weak DAC_Handler -DAC_Handler: - b . - - .thumb_func - .weak I2S_Handler -I2S_Handler: - b . - -#endif - -/***************************************************************************** - * Vector Table * - *****************************************************************************/ - - .section .vectors, "ax" - .align 0 - .global _vectors - .extern __stack_end__ - .extern Reset_Handler - -_vectors: - .word __stack_end__ - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word SVC_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word PendSV_Handler - .word SysTick_Handler - .word PM_Handler - .word SYSCTRL_Handler - .word WDT_Handler - .word RTC_Handler - .word EIC_Handler - .word NVMCTRL_Handler - .word DMAC_Handler - .word USB_Handler - .word EVSYS_Handler - .word SERCOM0_Handler - .word SERCOM1_Handler - .word SERCOM2_Handler - .word SERCOM3_Handler - .word SERCOM4_Handler - .word SERCOM5_Handler - .word TCC0_Handler - .word TCC1_Handler - .word TCC2_Handler - .word TC3_Handler - .word TC4_Handler - .word TC5_Handler - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word ADC_Handler - .word AC_Handler - .word DAC_Handler - .word Dummy_Handler /* Reserved */ - .word I2S_Handler -_vectors_end: - -#ifdef VECTORS_IN_RAM - .section .vectors_ram, "ax" - .align 0 - .global _vectors_ram - -_vectors_ram: - .space _vectors_end - _vectors, 0 -#endif diff --git a/examples/device/cdc_msc/ses/samd21/SAMD21_Startup.s b/examples/device/cdc_msc/ses/samd21/SAMD21_Startup.s deleted file mode 100644 index c4b48d35..00000000 --- a/examples/device/cdc_msc/ses/samd21/SAMD21_Startup.s +++ /dev/null @@ -1,114 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * NO_STACK_INIT * - * * - * If defined, the stack pointer will not be initialised. * - * * - * NO_SYSTEM_INIT * - * * - * If defined, the SystemInit() function will not be called. By default * - * SystemInit() is called after reset to enable the clocks and memories to * - * be initialised prior to any C startup initialisation. * - * * - * NO_VTOR_CONFIG * - * * - * If defined, the vector table offset register will not be configured. * - * * - * MEMORY_INIT * - * * - * If defined, the MemoryInit() function will be called. By default * - * MemoryInit() is called after SystemInit() to enable an external memory * - * controller. * - * * - * STACK_INIT_VAL * - * * - * If defined, specifies the initial stack pointer value. If undefined, * - * the stack pointer will be initialised to point to the end of the * - * RAM segment. * - * * - * VECTORS_IN_RAM * - * * - * If defined, the exception vectors will be copied from Flash to RAM. * - * * - *****************************************************************************/ - - .syntax unified - - .global Reset_Handler - .extern _vectors - - .section .init, "ax" - .thumb_func - - .equ VTOR_REG, 0xE000ED08 - -#ifndef STACK_INIT_VAL -#define STACK_INIT_VAL __RAM_segment_end__ -#endif - -Reset_Handler: -#ifndef NO_STACK_INIT - /* Initialise main stack */ - ldr r0, =STACK_INIT_VAL - ldr r1, =0x7 - bics r0, r1 - mov sp, r0 -#endif - -#ifndef NO_SYSTEM_INIT - /* Initialise system */ - ldr r0, =SystemInit - blx r0 - .pushsection .init_array, "aw", %init_array - .word SystemCoreClockUpdate - .popsection -#endif - -#ifdef MEMORY_INIT - ldr r0, =MemoryInit - blx r0 -#endif - -#ifdef VECTORS_IN_RAM - /* Copy exception vectors into RAM */ - ldr r0, =__vectors_start__ - ldr r1, =__vectors_end__ - ldr r2, =__vectors_ram_start__ -1: - cmp r0, r1 - beq 2f - ldr r3, [r0] - str r3, [r2] - adds r0, r0, #4 - adds r2, r2, #4 - b 1b -2: -#endif - -#ifndef NO_VTOR_CONFIG - /* Configure vector table offset register */ - ldr r0, =VTOR_REG -#ifdef VECTORS_IN_RAM - ldr r1, =_vectors_ram -#else - ldr r1, =_vectors -#endif - str r1, [r0] -#endif - - /* Jump to program start */ - b _start - - diff --git a/examples/device/cdc_msc/ses/samd21/SAMD21_Target.js b/examples/device/cdc_msc/ses/samd21/SAMD21_Target.js deleted file mode 100644 index 20560af4..00000000 --- a/examples/device/cdc_msc/ses/samd21/SAMD21_Target.js +++ /dev/null @@ -1,19 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -function Reset() { - TargetInterface.resetAndStop(); -} - -function EnableTrace(traceInterfaceType) { - // TODO: Enable trace -} - diff --git a/examples/device/cdc_msc/ses/samd21/flash_placement.xml b/examples/device/cdc_msc/ses/samd21/flash_placement.xml deleted file mode 100644 index 79bedc53..00000000 --- a/examples/device/cdc_msc/ses/samd21/flash_placement.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/samd21/samd21.emProject b/examples/device/cdc_msc/ses/samd21/samd21.emProject deleted file mode 100644 index 6740241a..00000000 --- a/examples/device/cdc_msc/ses/samd21/samd21.emProject +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/samd21/thumb_crt0.s b/examples/device/cdc_msc/ses/samd21/thumb_crt0.s deleted file mode 100644 index 17f88e0c..00000000 --- a/examples/device/cdc_msc/ses/samd21/thumb_crt0.s +++ /dev/null @@ -1,415 +0,0 @@ -// ********************************************************************** -// * SEGGER Microcontroller GmbH * -// * The Embedded Experts * -// ********************************************************************** -// * * -// * (c) 2014 - 2018 SEGGER Microcontroller GmbH * -// * (c) 2001 - 2018 Rowley Associates Limited * -// * * -// * www.segger.com Support: support@segger.com * -// * * -// ********************************************************************** -// * * -// * All rights reserved. * -// * * -// * Redistribution and use in source and binary forms, with or * -// * without modification, are permitted provided that the following * -// * conditions are met: * -// * * -// * - Redistributions of source code must retain the above copyright * -// * notice, this list of conditions and the following disclaimer. * -// * * -// * - Neither the name of SEGGER Microcontroller GmbH * -// * nor the names of its contributors may be used to endorse or * -// * promote products derived from this software without specific * -// * prior written permission. * -// * * -// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -// * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -// * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -// * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -// * DISCLAIMED. * -// * IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -// * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -// * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -// * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -// * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -// * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -// * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -// * DAMAGE. * -// * * -// ********************************************************************** -// -// -// Preprocessor Definitions -// ------------------------ -// APP_ENTRY_POINT -// -// Defines the application entry point function, if undefined this setting -// defaults to "main". -// -// INITIALIZE_STACK -// -// If defined, the contents of the stack will be initialized to a the -// value 0xCC. -// -// INITIALIZE_SECONDARY_SECTIONS -// -// If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized. -// -// INITIALIZE_TCM_SECTIONS -// -// If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections -// will be initialized. -// -// INITIALIZE_USER_SECTIONS -// -// If defined, the function InitializeUserMemorySections will be called prior -// to entering main in order to allow the user to initialize any user defined -// memory sections. -// -// FULL_LIBRARY -// -// If defined then -// - argc, argv are setup by the debug_getargs. -// - the exit symbol is defined and executes on return from main. -// - the exit symbol calls destructors, atexit functions and then debug_exit. -// -// If not defined then -// - argc and argv are zero. -// - the exit symbol is defined, executes on return from main and loops -// - -#ifndef APP_ENTRY_POINT -#define APP_ENTRY_POINT main -#endif - -#ifndef ARGSSPACE -#define ARGSSPACE 128 -#endif - .syntax unified - - .global _start - .extern APP_ENTRY_POINT - .global exit - .weak exit - -#ifdef INITIALIZE_USER_SECTIONS - .extern InitializeUserMemorySections -#endif - - .section .init, "ax" - .code 16 - .balign 2 - .thumb_func - -_start: - /* Set up main stack if size > 0 */ - ldr r1, =__stack_end__ - ldr r0, =__stack_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - mov sp, r1 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - ldr r0, =__stack_start__ - bl memory_set -#endif -1: - - /* Set up process stack if size > 0 */ - ldr r1, =__stack_process_end__ - ldr r0, =__stack_process_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - msr psp, r1 - movs r2, #2 - msr control, r2 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - bl memory_set -#endif -1: - - /* Copy initialized memory sections into RAM (if necessary). */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl memory_copy - ldr r0, =__tdata_load_start__ - ldr r1, =__tdata_start__ - ldr r2, =__tdata_end__ - bl memory_copy -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__data2_load_start__ - ldr r1, =__data2_start__ - ldr r2, =__data2_end__ - bl memory_copy - ldr r0, =__text2_load_start__ - ldr r1, =__text2_start__ - ldr r2, =__text2_end__ - bl memory_copy - ldr r0, =__rodata2_load_start__ - ldr r1, =__rodata2_start__ - ldr r2, =__rodata2_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__data_tcm_load_start__ - ldr r1, =__data_tcm_start__ - ldr r2, =__data_tcm_end__ - bl memory_copy - ldr r0, =__text_tcm_load_start__ - ldr r1, =__text_tcm_start__ - ldr r2, =__text_tcm_end__ - bl memory_copy - ldr r0, =__rodata_tcm_load_start__ - ldr r1, =__rodata_tcm_start__ - ldr r2, =__rodata_tcm_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Zero the bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - movs r2, #0 - bl memory_set - ldr r0, =__tbss_start__ - ldr r1, =__tbss_end__ - movs r2, #0 - bl memory_set -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__bss2_start__ - ldr r1, =__bss2_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__bss_tcm_start__ - ldr r1, =__bss_tcm_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Initialize the heap */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - subs r1, r1, r0 - cmp r1, #8 - blt 1f - movs r2, #0 - str r2, [r0] - adds r0, r0, #4 - str r1, [r0] -1: - -#ifdef INITIALIZE_USER_SECTIONS - ldr r2, =InitializeUserMemorySections - blx r2 -#endif - - /* Call constructors */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -ctor_loop: - cmp r0, r1 - beq ctor_end - ldr r2, [r0] - adds r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b ctor_loop -ctor_end: - - /* Setup initial call frame */ - movs r0, #0 - mov lr, r0 - mov r12, sp - - .type start, function -start: - /* Jump to application entry point */ -#ifdef FULL_LIBRARY - movs r0, #ARGSSPACE - ldr r1, =args - ldr r2, =debug_getargs - blx r2 - ldr r1, =args -#else - movs r0, #0 - movs r1, #0 -#endif - ldr r2, =APP_ENTRY_POINT - blx r2 - - .thumb_func -exit: -#ifdef FULL_LIBRARY - mov r5, r0 // save the exit parameter/return result - - /* Call destructors */ - ldr r0, =__dtors_start__ - ldr r1, =__dtors_end__ -dtor_loop: - cmp r0, r1 - beq dtor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b dtor_loop -dtor_end: - - /* Call atexit functions */ - ldr r2, =_execute_at_exit_fns - blx r2 - - /* Call debug_exit with return result/exit parameter */ - mov r0, r5 - ldr r2, =debug_exit - blx r2 -#endif - - /* Returned from application entry point, loop forever. */ -exit_loop: - b exit_loop - - .thumb_func -memory_copy: - cmp r0, r1 - beq 2f - subs r2, r2, r1 - beq 2f -1: - ldrb r3, [r0] - adds r0, r0, #1 - strb r3, [r1] - adds r1, r1, #1 - subs r2, r2, #1 - bne 1b -2: - bx lr - - .thumb_func -memory_set: - cmp r0, r1 - beq 1f - strb r2, [r0] - adds r0, r0, #1 - b memory_set -1: - bx lr - - // default C/C++ library helpers - -.macro HELPER helper_name - .section .text.\helper_name, "ax", %progbits - .balign 2 - .global \helper_name - .weak \helper_name -\helper_name: - .thumb_func -.endm - -.macro JUMPTO name -#if defined(__thumb__) && !defined(__thumb2__) - mov r12, r0 - ldr r0, =\name - push {r0} - mov r0, r12 - pop {pc} -#else - b \name -#endif -.endm - -HELPER __aeabi_read_tp - ldr r0, =__tbss_start__-8 - bx lr -HELPER abort - b . -HELPER __assert - b . -HELPER __aeabi_assert - b . -HELPER __sync_synchronize - bx lr -HELPER __getchar - JUMPTO debug_getchar -HELPER __putchar - JUMPTO debug_putchar -HELPER __open - JUMPTO debug_fopen -HELPER __close - JUMPTO debug_fclose -HELPER __write - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fwrite -HELPER __read - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fread -HELPER __seek - push {r4, lr} - mov r4, r0 - bl debug_fseek - cmp r0, #0 - bne 1f - mov r0, r4 - bl debug_ftell - pop {r4, pc} -1: - ldr r0, =-1 - pop {r4, pc} - // char __user_locale_name_buffer[]; - .section .bss.__user_locale_name_buffer, "aw", %nobits - .global __user_locale_name_buffer - .weak __user_locale_name_buffer - __user_locale_name_buffer: - .word 0x0 - -#ifdef FULL_LIBRARY - .bss -args: - .space ARGSSPACE -#endif - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - diff --git a/examples/device/cdc_msc/ses/samd51/ATSAMD51J19A_MemoryMap.xml b/examples/device/cdc_msc/ses/samd51/ATSAMD51J19A_MemoryMap.xml deleted file mode 100644 index 49d9a9cb..00000000 --- a/examples/device/cdc_msc/ses/samd51/ATSAMD51J19A_MemoryMap.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/examples/device/cdc_msc/ses/samd51/ATSAMD51J19A_Registers.xml b/examples/device/cdc_msc/ses/samd51/ATSAMD51J19A_Registers.xml deleted file mode 100644 index 83fe837f..00000000 --- a/examples/device/cdc_msc/ses/samd51/ATSAMD51J19A_Registers.xml +++ /dev/null @@ -1,23643 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/samd51/ATSAMD51J19A_Vectors.s b/examples/device/cdc_msc/ses/samd51/ATSAMD51J19A_Vectors.s deleted file mode 100644 index 6369de86..00000000 --- a/examples/device/cdc_msc/ses/samd51/ATSAMD51J19A_Vectors.s +++ /dev/null @@ -1,1227 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * STARTUP_FROM_RESET * - * * - * If defined, the program will startup from power-on/reset. If not * - * defined the program will just loop endlessly from power-on/reset. * - * * - * VECTORS_IN_RAM * - * * - * If defined, an area of RAM will large enough to store the vector table * - * will be reserved. * - * * - *****************************************************************************/ - - .syntax unified - .code 16 - - .section .init, "ax" - .align 0 - -/***************************************************************************** - * Default Exception Handlers * - *****************************************************************************/ - -#ifndef STARTUP_FROM_RESET - - .thumb_func - .weak Reset_Wait -Reset_Wait: - b . - -#endif - - .thumb_func - .weak NMI_Handler -NMI_Handler: - b . - - .thumb_func - .weak HardFault_Handler -HardFault_Handler: - b . - - .thumb_func - .weak SVC_Handler -SVC_Handler: - b . - - .thumb_func - .weak PendSV_Handler -PendSV_Handler: - b . - - .thumb_func - .weak SysTick_Handler -SysTick_Handler: - b . - - .thumb_func -Dummy_Handler: - b . - -#if defined(__OPTIMIZATION_SMALL) - - .weak PM_Handler - .thumb_set PM_Handler,Dummy_Handler - - .weak MCLK_Handler - .thumb_set MCLK_Handler,Dummy_Handler - - .weak OSCCTRL_0_Handler - .thumb_set OSCCTRL_0_Handler,Dummy_Handler - - .weak OSCCTRL_1_Handler - .thumb_set OSCCTRL_1_Handler,Dummy_Handler - - .weak OSCCTRL_2_Handler - .thumb_set OSCCTRL_2_Handler,Dummy_Handler - - .weak OSCCTRL_3_Handler - .thumb_set OSCCTRL_3_Handler,Dummy_Handler - - .weak OSCCTRL_4_Handler - .thumb_set OSCCTRL_4_Handler,Dummy_Handler - - .weak OSC32KCTRL_Handler - .thumb_set OSC32KCTRL_Handler,Dummy_Handler - - .weak SUPC_0_Handler - .thumb_set SUPC_0_Handler,Dummy_Handler - - .weak SUPC_1_Handler - .thumb_set SUPC_1_Handler,Dummy_Handler - - .weak WDT_Handler - .thumb_set WDT_Handler,Dummy_Handler - - .weak RTC_Handler - .thumb_set RTC_Handler,Dummy_Handler - - .weak EIC_0_Handler - .thumb_set EIC_0_Handler,Dummy_Handler - - .weak EIC_1_Handler - .thumb_set EIC_1_Handler,Dummy_Handler - - .weak EIC_2_Handler - .thumb_set EIC_2_Handler,Dummy_Handler - - .weak EIC_3_Handler - .thumb_set EIC_3_Handler,Dummy_Handler - - .weak EIC_4_Handler - .thumb_set EIC_4_Handler,Dummy_Handler - - .weak EIC_5_Handler - .thumb_set EIC_5_Handler,Dummy_Handler - - .weak EIC_6_Handler - .thumb_set EIC_6_Handler,Dummy_Handler - - .weak EIC_7_Handler - .thumb_set EIC_7_Handler,Dummy_Handler - - .weak EIC_8_Handler - .thumb_set EIC_8_Handler,Dummy_Handler - - .weak EIC_9_Handler - .thumb_set EIC_9_Handler,Dummy_Handler - - .weak EIC_10_Handler - .thumb_set EIC_10_Handler,Dummy_Handler - - .weak EIC_11_Handler - .thumb_set EIC_11_Handler,Dummy_Handler - - .weak EIC_12_Handler - .thumb_set EIC_12_Handler,Dummy_Handler - - .weak EIC_13_Handler - .thumb_set EIC_13_Handler,Dummy_Handler - - .weak EIC_14_Handler - .thumb_set EIC_14_Handler,Dummy_Handler - - .weak EIC_15_Handler - .thumb_set EIC_15_Handler,Dummy_Handler - - .weak FREQM_Handler - .thumb_set FREQM_Handler,Dummy_Handler - - .weak NVMCTRL_0_Handler - .thumb_set NVMCTRL_0_Handler,Dummy_Handler - - .weak NVMCTRL_1_Handler - .thumb_set NVMCTRL_1_Handler,Dummy_Handler - - .weak DMAC_0_Handler - .thumb_set DMAC_0_Handler,Dummy_Handler - - .weak DMAC_1_Handler - .thumb_set DMAC_1_Handler,Dummy_Handler - - .weak DMAC_2_Handler - .thumb_set DMAC_2_Handler,Dummy_Handler - - .weak DMAC_3_Handler - .thumb_set DMAC_3_Handler,Dummy_Handler - - .weak DMAC_4_Handler - .thumb_set DMAC_4_Handler,Dummy_Handler - - .weak EVSYS_0_Handler - .thumb_set EVSYS_0_Handler,Dummy_Handler - - .weak EVSYS_1_Handler - .thumb_set EVSYS_1_Handler,Dummy_Handler - - .weak EVSYS_2_Handler - .thumb_set EVSYS_2_Handler,Dummy_Handler - - .weak EVSYS_3_Handler - .thumb_set EVSYS_3_Handler,Dummy_Handler - - .weak EVSYS_4_Handler - .thumb_set EVSYS_4_Handler,Dummy_Handler - - .weak PAC_Handler - .thumb_set PAC_Handler,Dummy_Handler - - .weak TAL_0_Handler - .thumb_set TAL_0_Handler,Dummy_Handler - - .weak TAL_1_Handler - .thumb_set TAL_1_Handler,Dummy_Handler - - .weak RAMECC_Handler - .thumb_set RAMECC_Handler,Dummy_Handler - - .weak SERCOM0_0_Handler - .thumb_set SERCOM0_0_Handler,Dummy_Handler - - .weak SERCOM0_1_Handler - .thumb_set SERCOM0_1_Handler,Dummy_Handler - - .weak SERCOM0_2_Handler - .thumb_set SERCOM0_2_Handler,Dummy_Handler - - .weak SERCOM0_3_Handler - .thumb_set SERCOM0_3_Handler,Dummy_Handler - - .weak SERCOM1_0_Handler - .thumb_set SERCOM1_0_Handler,Dummy_Handler - - .weak SERCOM1_1_Handler - .thumb_set SERCOM1_1_Handler,Dummy_Handler - - .weak SERCOM1_2_Handler - .thumb_set SERCOM1_2_Handler,Dummy_Handler - - .weak SERCOM1_3_Handler - .thumb_set SERCOM1_3_Handler,Dummy_Handler - - .weak SERCOM2_0_Handler - .thumb_set SERCOM2_0_Handler,Dummy_Handler - - .weak SERCOM2_1_Handler - .thumb_set SERCOM2_1_Handler,Dummy_Handler - - .weak SERCOM2_2_Handler - .thumb_set SERCOM2_2_Handler,Dummy_Handler - - .weak SERCOM2_3_Handler - .thumb_set SERCOM2_3_Handler,Dummy_Handler - - .weak SERCOM3_0_Handler - .thumb_set SERCOM3_0_Handler,Dummy_Handler - - .weak SERCOM3_1_Handler - .thumb_set SERCOM3_1_Handler,Dummy_Handler - - .weak SERCOM3_2_Handler - .thumb_set SERCOM3_2_Handler,Dummy_Handler - - .weak SERCOM3_3_Handler - .thumb_set SERCOM3_3_Handler,Dummy_Handler - - .weak SERCOM4_0_Handler - .thumb_set SERCOM4_0_Handler,Dummy_Handler - - .weak SERCOM4_1_Handler - .thumb_set SERCOM4_1_Handler,Dummy_Handler - - .weak SERCOM4_2_Handler - .thumb_set SERCOM4_2_Handler,Dummy_Handler - - .weak SERCOM4_3_Handler - .thumb_set SERCOM4_3_Handler,Dummy_Handler - - .weak SERCOM5_0_Handler - .thumb_set SERCOM5_0_Handler,Dummy_Handler - - .weak SERCOM5_1_Handler - .thumb_set SERCOM5_1_Handler,Dummy_Handler - - .weak SERCOM5_2_Handler - .thumb_set SERCOM5_2_Handler,Dummy_Handler - - .weak SERCOM5_3_Handler - .thumb_set SERCOM5_3_Handler,Dummy_Handler - - .weak USB_0_Handler - .thumb_set USB_0_Handler,Dummy_Handler - - .weak USB_1_Handler - .thumb_set USB_1_Handler,Dummy_Handler - - .weak USB_2_Handler - .thumb_set USB_2_Handler,Dummy_Handler - - .weak USB_3_Handler - .thumb_set USB_3_Handler,Dummy_Handler - - .weak TCC0_0_Handler - .thumb_set TCC0_0_Handler,Dummy_Handler - - .weak TCC0_1_Handler - .thumb_set TCC0_1_Handler,Dummy_Handler - - .weak TCC0_2_Handler - .thumb_set TCC0_2_Handler,Dummy_Handler - - .weak TCC0_3_Handler - .thumb_set TCC0_3_Handler,Dummy_Handler - - .weak TCC0_4_Handler - .thumb_set TCC0_4_Handler,Dummy_Handler - - .weak TCC0_5_Handler - .thumb_set TCC0_5_Handler,Dummy_Handler - - .weak TCC0_6_Handler - .thumb_set TCC0_6_Handler,Dummy_Handler - - .weak TCC1_0_Handler - .thumb_set TCC1_0_Handler,Dummy_Handler - - .weak TCC1_1_Handler - .thumb_set TCC1_1_Handler,Dummy_Handler - - .weak TCC1_2_Handler - .thumb_set TCC1_2_Handler,Dummy_Handler - - .weak TCC1_3_Handler - .thumb_set TCC1_3_Handler,Dummy_Handler - - .weak TCC1_4_Handler - .thumb_set TCC1_4_Handler,Dummy_Handler - - .weak TCC2_0_Handler - .thumb_set TCC2_0_Handler,Dummy_Handler - - .weak TCC2_1_Handler - .thumb_set TCC2_1_Handler,Dummy_Handler - - .weak TCC2_2_Handler - .thumb_set TCC2_2_Handler,Dummy_Handler - - .weak TCC2_3_Handler - .thumb_set TCC2_3_Handler,Dummy_Handler - - .weak TCC3_0_Handler - .thumb_set TCC3_0_Handler,Dummy_Handler - - .weak TCC3_1_Handler - .thumb_set TCC3_1_Handler,Dummy_Handler - - .weak TCC3_2_Handler - .thumb_set TCC3_2_Handler,Dummy_Handler - - .weak TCC4_0_Handler - .thumb_set TCC4_0_Handler,Dummy_Handler - - .weak TCC4_1_Handler - .thumb_set TCC4_1_Handler,Dummy_Handler - - .weak TCC4_2_Handler - .thumb_set TCC4_2_Handler,Dummy_Handler - - .weak TC0_Handler - .thumb_set TC0_Handler,Dummy_Handler - - .weak TC1_Handler - .thumb_set TC1_Handler,Dummy_Handler - - .weak TC2_Handler - .thumb_set TC2_Handler,Dummy_Handler - - .weak TC3_Handler - .thumb_set TC3_Handler,Dummy_Handler - - .weak TC4_Handler - .thumb_set TC4_Handler,Dummy_Handler - - .weak TC5_Handler - .thumb_set TC5_Handler,Dummy_Handler - - .weak PDEC_0_Handler - .thumb_set PDEC_0_Handler,Dummy_Handler - - .weak PDEC_1_Handler - .thumb_set PDEC_1_Handler,Dummy_Handler - - .weak PDEC_2_Handler - .thumb_set PDEC_2_Handler,Dummy_Handler - - .weak ADC0_0_Handler - .thumb_set ADC0_0_Handler,Dummy_Handler - - .weak ADC0_1_Handler - .thumb_set ADC0_1_Handler,Dummy_Handler - - .weak ADC1_0_Handler - .thumb_set ADC1_0_Handler,Dummy_Handler - - .weak ADC1_1_Handler - .thumb_set ADC1_1_Handler,Dummy_Handler - - .weak AC_Handler - .thumb_set AC_Handler,Dummy_Handler - - .weak DAC_0_Handler - .thumb_set DAC_0_Handler,Dummy_Handler - - .weak DAC_1_Handler - .thumb_set DAC_1_Handler,Dummy_Handler - - .weak DAC_2_Handler - .thumb_set DAC_2_Handler,Dummy_Handler - - .weak DAC_3_Handler - .thumb_set DAC_3_Handler,Dummy_Handler - - .weak DAC_4_Handler - .thumb_set DAC_4_Handler,Dummy_Handler - - .weak I2S_Handler - .thumb_set I2S_Handler,Dummy_Handler - - .weak PCC_Handler - .thumb_set PCC_Handler,Dummy_Handler - - .weak AES_Handler - .thumb_set AES_Handler,Dummy_Handler - - .weak TRNG_Handler - .thumb_set TRNG_Handler,Dummy_Handler - - .weak ICM_Handler - .thumb_set ICM_Handler,Dummy_Handler - - .weak QSPI_Handler - .thumb_set QSPI_Handler,Dummy_Handler - - .weak SDHC0_Handler - .thumb_set SDHC0_Handler,Dummy_Handler - -#else - - .thumb_func - .weak PM_Handler -PM_Handler: - b . - - .thumb_func - .weak MCLK_Handler -MCLK_Handler: - b . - - .thumb_func - .weak OSCCTRL_0_Handler -OSCCTRL_0_Handler: - b . - - .thumb_func - .weak OSCCTRL_1_Handler -OSCCTRL_1_Handler: - b . - - .thumb_func - .weak OSCCTRL_2_Handler -OSCCTRL_2_Handler: - b . - - .thumb_func - .weak OSCCTRL_3_Handler -OSCCTRL_3_Handler: - b . - - .thumb_func - .weak OSCCTRL_4_Handler -OSCCTRL_4_Handler: - b . - - .thumb_func - .weak OSC32KCTRL_Handler -OSC32KCTRL_Handler: - b . - - .thumb_func - .weak SUPC_0_Handler -SUPC_0_Handler: - b . - - .thumb_func - .weak SUPC_1_Handler -SUPC_1_Handler: - b . - - .thumb_func - .weak WDT_Handler -WDT_Handler: - b . - - .thumb_func - .weak RTC_Handler -RTC_Handler: - b . - - .thumb_func - .weak EIC_0_Handler -EIC_0_Handler: - b . - - .thumb_func - .weak EIC_1_Handler -EIC_1_Handler: - b . - - .thumb_func - .weak EIC_2_Handler -EIC_2_Handler: - b . - - .thumb_func - .weak EIC_3_Handler -EIC_3_Handler: - b . - - .thumb_func - .weak EIC_4_Handler -EIC_4_Handler: - b . - - .thumb_func - .weak EIC_5_Handler -EIC_5_Handler: - b . - - .thumb_func - .weak EIC_6_Handler -EIC_6_Handler: - b . - - .thumb_func - .weak EIC_7_Handler -EIC_7_Handler: - b . - - .thumb_func - .weak EIC_8_Handler -EIC_8_Handler: - b . - - .thumb_func - .weak EIC_9_Handler -EIC_9_Handler: - b . - - .thumb_func - .weak EIC_10_Handler -EIC_10_Handler: - b . - - .thumb_func - .weak EIC_11_Handler -EIC_11_Handler: - b . - - .thumb_func - .weak EIC_12_Handler -EIC_12_Handler: - b . - - .thumb_func - .weak EIC_13_Handler -EIC_13_Handler: - b . - - .thumb_func - .weak EIC_14_Handler -EIC_14_Handler: - b . - - .thumb_func - .weak EIC_15_Handler -EIC_15_Handler: - b . - - .thumb_func - .weak FREQM_Handler -FREQM_Handler: - b . - - .thumb_func - .weak NVMCTRL_0_Handler -NVMCTRL_0_Handler: - b . - - .thumb_func - .weak NVMCTRL_1_Handler -NVMCTRL_1_Handler: - b . - - .thumb_func - .weak DMAC_0_Handler -DMAC_0_Handler: - b . - - .thumb_func - .weak DMAC_1_Handler -DMAC_1_Handler: - b . - - .thumb_func - .weak DMAC_2_Handler -DMAC_2_Handler: - b . - - .thumb_func - .weak DMAC_3_Handler -DMAC_3_Handler: - b . - - .thumb_func - .weak DMAC_4_Handler -DMAC_4_Handler: - b . - - .thumb_func - .weak EVSYS_0_Handler -EVSYS_0_Handler: - b . - - .thumb_func - .weak EVSYS_1_Handler -EVSYS_1_Handler: - b . - - .thumb_func - .weak EVSYS_2_Handler -EVSYS_2_Handler: - b . - - .thumb_func - .weak EVSYS_3_Handler -EVSYS_3_Handler: - b . - - .thumb_func - .weak EVSYS_4_Handler -EVSYS_4_Handler: - b . - - .thumb_func - .weak PAC_Handler -PAC_Handler: - b . - - .thumb_func - .weak TAL_0_Handler -TAL_0_Handler: - b . - - .thumb_func - .weak TAL_1_Handler -TAL_1_Handler: - b . - - .thumb_func - .weak RAMECC_Handler -RAMECC_Handler: - b . - - .thumb_func - .weak SERCOM0_0_Handler -SERCOM0_0_Handler: - b . - - .thumb_func - .weak SERCOM0_1_Handler -SERCOM0_1_Handler: - b . - - .thumb_func - .weak SERCOM0_2_Handler -SERCOM0_2_Handler: - b . - - .thumb_func - .weak SERCOM0_3_Handler -SERCOM0_3_Handler: - b . - - .thumb_func - .weak SERCOM1_0_Handler -SERCOM1_0_Handler: - b . - - .thumb_func - .weak SERCOM1_1_Handler -SERCOM1_1_Handler: - b . - - .thumb_func - .weak SERCOM1_2_Handler -SERCOM1_2_Handler: - b . - - .thumb_func - .weak SERCOM1_3_Handler -SERCOM1_3_Handler: - b . - - .thumb_func - .weak SERCOM2_0_Handler -SERCOM2_0_Handler: - b . - - .thumb_func - .weak SERCOM2_1_Handler -SERCOM2_1_Handler: - b . - - .thumb_func - .weak SERCOM2_2_Handler -SERCOM2_2_Handler: - b . - - .thumb_func - .weak SERCOM2_3_Handler -SERCOM2_3_Handler: - b . - - .thumb_func - .weak SERCOM3_0_Handler -SERCOM3_0_Handler: - b . - - .thumb_func - .weak SERCOM3_1_Handler -SERCOM3_1_Handler: - b . - - .thumb_func - .weak SERCOM3_2_Handler -SERCOM3_2_Handler: - b . - - .thumb_func - .weak SERCOM3_3_Handler -SERCOM3_3_Handler: - b . - - .thumb_func - .weak SERCOM4_0_Handler -SERCOM4_0_Handler: - b . - - .thumb_func - .weak SERCOM4_1_Handler -SERCOM4_1_Handler: - b . - - .thumb_func - .weak SERCOM4_2_Handler -SERCOM4_2_Handler: - b . - - .thumb_func - .weak SERCOM4_3_Handler -SERCOM4_3_Handler: - b . - - .thumb_func - .weak SERCOM5_0_Handler -SERCOM5_0_Handler: - b . - - .thumb_func - .weak SERCOM5_1_Handler -SERCOM5_1_Handler: - b . - - .thumb_func - .weak SERCOM5_2_Handler -SERCOM5_2_Handler: - b . - - .thumb_func - .weak SERCOM5_3_Handler -SERCOM5_3_Handler: - b . - - .thumb_func - .weak USB_0_Handler -USB_0_Handler: - b . - - .thumb_func - .weak USB_1_Handler -USB_1_Handler: - b . - - .thumb_func - .weak USB_2_Handler -USB_2_Handler: - b . - - .thumb_func - .weak USB_3_Handler -USB_3_Handler: - b . - - .thumb_func - .weak TCC0_0_Handler -TCC0_0_Handler: - b . - - .thumb_func - .weak TCC0_1_Handler -TCC0_1_Handler: - b . - - .thumb_func - .weak TCC0_2_Handler -TCC0_2_Handler: - b . - - .thumb_func - .weak TCC0_3_Handler -TCC0_3_Handler: - b . - - .thumb_func - .weak TCC0_4_Handler -TCC0_4_Handler: - b . - - .thumb_func - .weak TCC0_5_Handler -TCC0_5_Handler: - b . - - .thumb_func - .weak TCC0_6_Handler -TCC0_6_Handler: - b . - - .thumb_func - .weak TCC1_0_Handler -TCC1_0_Handler: - b . - - .thumb_func - .weak TCC1_1_Handler -TCC1_1_Handler: - b . - - .thumb_func - .weak TCC1_2_Handler -TCC1_2_Handler: - b . - - .thumb_func - .weak TCC1_3_Handler -TCC1_3_Handler: - b . - - .thumb_func - .weak TCC1_4_Handler -TCC1_4_Handler: - b . - - .thumb_func - .weak TCC2_0_Handler -TCC2_0_Handler: - b . - - .thumb_func - .weak TCC2_1_Handler -TCC2_1_Handler: - b . - - .thumb_func - .weak TCC2_2_Handler -TCC2_2_Handler: - b . - - .thumb_func - .weak TCC2_3_Handler -TCC2_3_Handler: - b . - - .thumb_func - .weak TCC3_0_Handler -TCC3_0_Handler: - b . - - .thumb_func - .weak TCC3_1_Handler -TCC3_1_Handler: - b . - - .thumb_func - .weak TCC3_2_Handler -TCC3_2_Handler: - b . - - .thumb_func - .weak TCC4_0_Handler -TCC4_0_Handler: - b . - - .thumb_func - .weak TCC4_1_Handler -TCC4_1_Handler: - b . - - .thumb_func - .weak TCC4_2_Handler -TCC4_2_Handler: - b . - - .thumb_func - .weak TC0_Handler -TC0_Handler: - b . - - .thumb_func - .weak TC1_Handler -TC1_Handler: - b . - - .thumb_func - .weak TC2_Handler -TC2_Handler: - b . - - .thumb_func - .weak TC3_Handler -TC3_Handler: - b . - - .thumb_func - .weak TC4_Handler -TC4_Handler: - b . - - .thumb_func - .weak TC5_Handler -TC5_Handler: - b . - - .thumb_func - .weak PDEC_0_Handler -PDEC_0_Handler: - b . - - .thumb_func - .weak PDEC_1_Handler -PDEC_1_Handler: - b . - - .thumb_func - .weak PDEC_2_Handler -PDEC_2_Handler: - b . - - .thumb_func - .weak ADC0_0_Handler -ADC0_0_Handler: - b . - - .thumb_func - .weak ADC0_1_Handler -ADC0_1_Handler: - b . - - .thumb_func - .weak ADC1_0_Handler -ADC1_0_Handler: - b . - - .thumb_func - .weak ADC1_1_Handler -ADC1_1_Handler: - b . - - .thumb_func - .weak AC_Handler -AC_Handler: - b . - - .thumb_func - .weak DAC_0_Handler -DAC_0_Handler: - b . - - .thumb_func - .weak DAC_1_Handler -DAC_1_Handler: - b . - - .thumb_func - .weak DAC_2_Handler -DAC_2_Handler: - b . - - .thumb_func - .weak DAC_3_Handler -DAC_3_Handler: - b . - - .thumb_func - .weak DAC_4_Handler -DAC_4_Handler: - b . - - .thumb_func - .weak I2S_Handler -I2S_Handler: - b . - - .thumb_func - .weak PCC_Handler -PCC_Handler: - b . - - .thumb_func - .weak AES_Handler -AES_Handler: - b . - - .thumb_func - .weak TRNG_Handler -TRNG_Handler: - b . - - .thumb_func - .weak ICM_Handler -ICM_Handler: - b . - - .thumb_func - .weak QSPI_Handler -QSPI_Handler: - b . - - .thumb_func - .weak SDHC0_Handler -SDHC0_Handler: - b . - -#endif - -/***************************************************************************** - * Vector Table * - *****************************************************************************/ - - .section .vectors, "ax" - .align 0 - .global _vectors - .extern __stack_end__ -#ifdef STARTUP_FROM_RESET - .extern Reset_Handler -#endif - -_vectors: - .word __stack_end__ -#ifdef STARTUP_FROM_RESET - .word Reset_Handler -#else - .word Reset_Wait -#endif - .word NMI_Handler - .word HardFault_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word SVC_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word PendSV_Handler - .word SysTick_Handler - .word PM_Handler - .word MCLK_Handler - .word OSCCTRL_0_Handler - .word OSCCTRL_1_Handler - .word OSCCTRL_2_Handler - .word OSCCTRL_3_Handler - .word OSCCTRL_4_Handler - .word OSC32KCTRL_Handler - .word SUPC_0_Handler - .word SUPC_1_Handler - .word WDT_Handler - .word RTC_Handler - .word EIC_0_Handler - .word EIC_1_Handler - .word EIC_2_Handler - .word EIC_3_Handler - .word EIC_4_Handler - .word EIC_5_Handler - .word EIC_6_Handler - .word EIC_7_Handler - .word EIC_8_Handler - .word EIC_9_Handler - .word EIC_10_Handler - .word EIC_11_Handler - .word EIC_12_Handler - .word EIC_13_Handler - .word EIC_14_Handler - .word EIC_15_Handler - .word FREQM_Handler - .word NVMCTRL_0_Handler - .word NVMCTRL_1_Handler - .word DMAC_0_Handler - .word DMAC_1_Handler - .word DMAC_2_Handler - .word DMAC_3_Handler - .word DMAC_4_Handler - .word EVSYS_0_Handler - .word EVSYS_1_Handler - .word EVSYS_2_Handler - .word EVSYS_3_Handler - .word EVSYS_4_Handler - .word PAC_Handler - .word TAL_0_Handler - .word TAL_1_Handler - .word Dummy_Handler /* Reserved */ - .word RAMECC_Handler - .word SERCOM0_0_Handler - .word SERCOM0_1_Handler - .word SERCOM0_2_Handler - .word SERCOM0_3_Handler - .word SERCOM1_0_Handler - .word SERCOM1_1_Handler - .word SERCOM1_2_Handler - .word SERCOM1_3_Handler - .word SERCOM2_0_Handler - .word SERCOM2_1_Handler - .word SERCOM2_2_Handler - .word SERCOM2_3_Handler - .word SERCOM3_0_Handler - .word SERCOM3_1_Handler - .word SERCOM3_2_Handler - .word SERCOM3_3_Handler - .word SERCOM4_0_Handler - .word SERCOM4_1_Handler - .word SERCOM4_2_Handler - .word SERCOM4_3_Handler - .word SERCOM5_0_Handler - .word SERCOM5_1_Handler - .word SERCOM5_2_Handler - .word SERCOM5_3_Handler - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word USB_0_Handler - .word USB_1_Handler - .word USB_2_Handler - .word USB_3_Handler - .word Dummy_Handler /* Reserved */ - .word TCC0_0_Handler - .word TCC0_1_Handler - .word TCC0_2_Handler - .word TCC0_3_Handler - .word TCC0_4_Handler - .word TCC0_5_Handler - .word TCC0_6_Handler - .word TCC1_0_Handler - .word TCC1_1_Handler - .word TCC1_2_Handler - .word TCC1_3_Handler - .word TCC1_4_Handler - .word TCC2_0_Handler - .word TCC2_1_Handler - .word TCC2_2_Handler - .word TCC2_3_Handler - .word TCC3_0_Handler - .word TCC3_1_Handler - .word TCC3_2_Handler - .word TCC4_0_Handler - .word TCC4_1_Handler - .word TCC4_2_Handler - .word TC0_Handler - .word TC1_Handler - .word TC2_Handler - .word TC3_Handler - .word TC4_Handler - .word TC5_Handler - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word PDEC_0_Handler - .word PDEC_1_Handler - .word PDEC_2_Handler - .word ADC0_0_Handler - .word ADC0_1_Handler - .word ADC1_0_Handler - .word ADC1_1_Handler - .word AC_Handler - .word DAC_0_Handler - .word DAC_1_Handler - .word DAC_2_Handler - .word DAC_3_Handler - .word DAC_4_Handler - .word I2S_Handler - .word PCC_Handler - .word AES_Handler - .word TRNG_Handler - .word ICM_Handler - .word Dummy_Handler /* Reserved */ - .word QSPI_Handler - .word SDHC0_Handler -_vectors_end: - -#ifdef VECTORS_IN_RAM - .section .vectors_ram, "ax" - .align 0 - .global _vectors_ram - -_vectors_ram: - .space _vectors_end - _vectors, 0 -#endif diff --git a/examples/device/cdc_msc/ses/samd51/SAMD51_Startup.s b/examples/device/cdc_msc/ses/samd51/SAMD51_Startup.s deleted file mode 100644 index 03bf54de..00000000 --- a/examples/device/cdc_msc/ses/samd51/SAMD51_Startup.s +++ /dev/null @@ -1,128 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * NO_FPU_ENABLE * - * * - * If defined, FPU will not be enabled. * - * * - * NO_STACK_INIT * - * * - * If defined, the stack pointer will not be initialised. * - * * - * NO_SYSTEM_INIT * - * * - * If defined, the SystemInit() function will not be called. By default * - * SystemInit() is called after reset to enable the clocks and memories to * - * be initialised prior to any C startup initialisation. * - * * - * NO_VTOR_CONFIG * - * * - * If defined, the vector table offset register will not be configured. * - * * - * MEMORY_INIT * - * * - * If defined, the MemoryInit() function will be called. By default * - * MemoryInit() is called after SystemInit() to enable an external memory * - * controller. * - * * - * STACK_INIT_VAL * - * * - * If defined, specifies the initial stack pointer value. If undefined, * - * the stack pointer will be initialised to point to the end of the * - * RAM segment. * - * * - * VECTORS_IN_RAM * - * * - * If defined, the exception vectors will be copied from Flash to RAM. * - * * - *****************************************************************************/ - - .syntax unified - - .global Reset_Handler - .extern _vectors - - .section .init, "ax" - .thumb_func - - .equ VTOR_REG, 0xE000ED08 - .equ FPU_CPACR_REG, 0xE000ED88 - -#ifndef STACK_INIT_VAL -#define STACK_INIT_VAL __RAM_segment_end__ -#endif - -Reset_Handler: -#ifndef NO_STACK_INIT - /* Initialise main stack */ - ldr r0, =STACK_INIT_VAL - bic r0, #0x7 - mov sp, r0 -#endif - -#ifndef NO_SYSTEM_INIT - /* Initialise system */ - ldr r0, =SystemInit - blx r0 - .pushsection .init_array, "aw", %init_array - .word SystemCoreClockUpdate - .popsection -#endif - -#ifdef MEMORY_INIT - ldr r0, =MemoryInit - blx r0 -#endif - -#ifdef VECTORS_IN_RAM - /* Copy exception vectors into RAM */ - ldr r0, =__vectors_start__ - ldr r1, =__vectors_end__ - ldr r2, =__vectors_ram_start__ -1: - cmp r0, r1 - beq 2f - ldr r3, [r0] - str r3, [r2] - adds r0, r0, #4 - adds r2, r2, #4 - b 1b -2: -#endif - -#ifndef NO_VTOR_CONFIG - /* Configure vector table offset register */ - ldr r0, =VTOR_REG -#ifdef VECTORS_IN_RAM - ldr r1, =_vectors_ram -#else - ldr r1, =_vectors -#endif - str r1, [r0] -#endif - -#if (defined(__ARM_ARCH_FPV4_SP_D16__) || defined(__ARM_ARCH_FPV5_D16__)) && !defined(NO_FPU_ENABLE) - /* Enable FPU */ - ldr r0, =FPU_CPACR_REG - ldr r1, [r0] - orr r1, r1, #(0xF << 20) - str r1, [r0] - dsb - isb -#endif - - /* Jump to program start */ - b _start - - diff --git a/examples/device/cdc_msc/ses/samd51/SAMD51_Target.js b/examples/device/cdc_msc/ses/samd51/SAMD51_Target.js deleted file mode 100644 index 20560af4..00000000 --- a/examples/device/cdc_msc/ses/samd51/SAMD51_Target.js +++ /dev/null @@ -1,19 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -function Reset() { - TargetInterface.resetAndStop(); -} - -function EnableTrace(traceInterfaceType) { - // TODO: Enable trace -} - diff --git a/examples/device/cdc_msc/ses/samd51/flash_placement.xml b/examples/device/cdc_msc/ses/samd51/flash_placement.xml deleted file mode 100644 index 79bedc53..00000000 --- a/examples/device/cdc_msc/ses/samd51/flash_placement.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/samd51/samd51.emProject b/examples/device/cdc_msc/ses/samd51/samd51.emProject deleted file mode 100644 index d4049e83..00000000 --- a/examples/device/cdc_msc/ses/samd51/samd51.emProject +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/samd51/thumb_crt0.s b/examples/device/cdc_msc/ses/samd51/thumb_crt0.s deleted file mode 100644 index 17f88e0c..00000000 --- a/examples/device/cdc_msc/ses/samd51/thumb_crt0.s +++ /dev/null @@ -1,415 +0,0 @@ -// ********************************************************************** -// * SEGGER Microcontroller GmbH * -// * The Embedded Experts * -// ********************************************************************** -// * * -// * (c) 2014 - 2018 SEGGER Microcontroller GmbH * -// * (c) 2001 - 2018 Rowley Associates Limited * -// * * -// * www.segger.com Support: support@segger.com * -// * * -// ********************************************************************** -// * * -// * All rights reserved. * -// * * -// * Redistribution and use in source and binary forms, with or * -// * without modification, are permitted provided that the following * -// * conditions are met: * -// * * -// * - Redistributions of source code must retain the above copyright * -// * notice, this list of conditions and the following disclaimer. * -// * * -// * - Neither the name of SEGGER Microcontroller GmbH * -// * nor the names of its contributors may be used to endorse or * -// * promote products derived from this software without specific * -// * prior written permission. * -// * * -// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -// * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -// * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -// * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -// * DISCLAIMED. * -// * IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -// * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -// * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -// * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -// * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -// * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -// * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -// * DAMAGE. * -// * * -// ********************************************************************** -// -// -// Preprocessor Definitions -// ------------------------ -// APP_ENTRY_POINT -// -// Defines the application entry point function, if undefined this setting -// defaults to "main". -// -// INITIALIZE_STACK -// -// If defined, the contents of the stack will be initialized to a the -// value 0xCC. -// -// INITIALIZE_SECONDARY_SECTIONS -// -// If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized. -// -// INITIALIZE_TCM_SECTIONS -// -// If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections -// will be initialized. -// -// INITIALIZE_USER_SECTIONS -// -// If defined, the function InitializeUserMemorySections will be called prior -// to entering main in order to allow the user to initialize any user defined -// memory sections. -// -// FULL_LIBRARY -// -// If defined then -// - argc, argv are setup by the debug_getargs. -// - the exit symbol is defined and executes on return from main. -// - the exit symbol calls destructors, atexit functions and then debug_exit. -// -// If not defined then -// - argc and argv are zero. -// - the exit symbol is defined, executes on return from main and loops -// - -#ifndef APP_ENTRY_POINT -#define APP_ENTRY_POINT main -#endif - -#ifndef ARGSSPACE -#define ARGSSPACE 128 -#endif - .syntax unified - - .global _start - .extern APP_ENTRY_POINT - .global exit - .weak exit - -#ifdef INITIALIZE_USER_SECTIONS - .extern InitializeUserMemorySections -#endif - - .section .init, "ax" - .code 16 - .balign 2 - .thumb_func - -_start: - /* Set up main stack if size > 0 */ - ldr r1, =__stack_end__ - ldr r0, =__stack_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - mov sp, r1 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - ldr r0, =__stack_start__ - bl memory_set -#endif -1: - - /* Set up process stack if size > 0 */ - ldr r1, =__stack_process_end__ - ldr r0, =__stack_process_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - msr psp, r1 - movs r2, #2 - msr control, r2 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - bl memory_set -#endif -1: - - /* Copy initialized memory sections into RAM (if necessary). */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl memory_copy - ldr r0, =__tdata_load_start__ - ldr r1, =__tdata_start__ - ldr r2, =__tdata_end__ - bl memory_copy -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__data2_load_start__ - ldr r1, =__data2_start__ - ldr r2, =__data2_end__ - bl memory_copy - ldr r0, =__text2_load_start__ - ldr r1, =__text2_start__ - ldr r2, =__text2_end__ - bl memory_copy - ldr r0, =__rodata2_load_start__ - ldr r1, =__rodata2_start__ - ldr r2, =__rodata2_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__data_tcm_load_start__ - ldr r1, =__data_tcm_start__ - ldr r2, =__data_tcm_end__ - bl memory_copy - ldr r0, =__text_tcm_load_start__ - ldr r1, =__text_tcm_start__ - ldr r2, =__text_tcm_end__ - bl memory_copy - ldr r0, =__rodata_tcm_load_start__ - ldr r1, =__rodata_tcm_start__ - ldr r2, =__rodata_tcm_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Zero the bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - movs r2, #0 - bl memory_set - ldr r0, =__tbss_start__ - ldr r1, =__tbss_end__ - movs r2, #0 - bl memory_set -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__bss2_start__ - ldr r1, =__bss2_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__bss_tcm_start__ - ldr r1, =__bss_tcm_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Initialize the heap */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - subs r1, r1, r0 - cmp r1, #8 - blt 1f - movs r2, #0 - str r2, [r0] - adds r0, r0, #4 - str r1, [r0] -1: - -#ifdef INITIALIZE_USER_SECTIONS - ldr r2, =InitializeUserMemorySections - blx r2 -#endif - - /* Call constructors */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -ctor_loop: - cmp r0, r1 - beq ctor_end - ldr r2, [r0] - adds r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b ctor_loop -ctor_end: - - /* Setup initial call frame */ - movs r0, #0 - mov lr, r0 - mov r12, sp - - .type start, function -start: - /* Jump to application entry point */ -#ifdef FULL_LIBRARY - movs r0, #ARGSSPACE - ldr r1, =args - ldr r2, =debug_getargs - blx r2 - ldr r1, =args -#else - movs r0, #0 - movs r1, #0 -#endif - ldr r2, =APP_ENTRY_POINT - blx r2 - - .thumb_func -exit: -#ifdef FULL_LIBRARY - mov r5, r0 // save the exit parameter/return result - - /* Call destructors */ - ldr r0, =__dtors_start__ - ldr r1, =__dtors_end__ -dtor_loop: - cmp r0, r1 - beq dtor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b dtor_loop -dtor_end: - - /* Call atexit functions */ - ldr r2, =_execute_at_exit_fns - blx r2 - - /* Call debug_exit with return result/exit parameter */ - mov r0, r5 - ldr r2, =debug_exit - blx r2 -#endif - - /* Returned from application entry point, loop forever. */ -exit_loop: - b exit_loop - - .thumb_func -memory_copy: - cmp r0, r1 - beq 2f - subs r2, r2, r1 - beq 2f -1: - ldrb r3, [r0] - adds r0, r0, #1 - strb r3, [r1] - adds r1, r1, #1 - subs r2, r2, #1 - bne 1b -2: - bx lr - - .thumb_func -memory_set: - cmp r0, r1 - beq 1f - strb r2, [r0] - adds r0, r0, #1 - b memory_set -1: - bx lr - - // default C/C++ library helpers - -.macro HELPER helper_name - .section .text.\helper_name, "ax", %progbits - .balign 2 - .global \helper_name - .weak \helper_name -\helper_name: - .thumb_func -.endm - -.macro JUMPTO name -#if defined(__thumb__) && !defined(__thumb2__) - mov r12, r0 - ldr r0, =\name - push {r0} - mov r0, r12 - pop {pc} -#else - b \name -#endif -.endm - -HELPER __aeabi_read_tp - ldr r0, =__tbss_start__-8 - bx lr -HELPER abort - b . -HELPER __assert - b . -HELPER __aeabi_assert - b . -HELPER __sync_synchronize - bx lr -HELPER __getchar - JUMPTO debug_getchar -HELPER __putchar - JUMPTO debug_putchar -HELPER __open - JUMPTO debug_fopen -HELPER __close - JUMPTO debug_fclose -HELPER __write - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fwrite -HELPER __read - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fread -HELPER __seek - push {r4, lr} - mov r4, r0 - bl debug_fseek - cmp r0, #0 - bne 1f - mov r0, r4 - bl debug_ftell - pop {r4, pc} -1: - ldr r0, =-1 - pop {r4, pc} - // char __user_locale_name_buffer[]; - .section .bss.__user_locale_name_buffer, "aw", %nobits - .global __user_locale_name_buffer - .weak __user_locale_name_buffer - __user_locale_name_buffer: - .word 0x0 - -#ifdef FULL_LIBRARY - .bss -args: - .space ARGSSPACE -#endif - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - diff --git a/examples/device/cdc_msc/ses/stm32f4/STM32F407VG_MemoryMap.xml b/examples/device/cdc_msc/ses/stm32f4/STM32F407VG_MemoryMap.xml deleted file mode 100644 index 54f86de7..00000000 --- a/examples/device/cdc_msc/ses/stm32f4/STM32F407VG_MemoryMap.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/examples/device/cdc_msc/ses/stm32f4/STM32F40x_Registers.xml b/examples/device/cdc_msc/ses/stm32f4/STM32F40x_Registers.xml deleted file mode 100644 index a11cf730..00000000 --- a/examples/device/cdc_msc/ses/stm32f4/STM32F40x_Registers.xml +++ /dev/null @@ -1,13923 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/stm32f4/STM32F40x_Vectors.s b/examples/device/cdc_msc/ses/stm32f4/STM32F40x_Vectors.s deleted file mode 100644 index e9e0392b..00000000 --- a/examples/device/cdc_msc/ses/stm32f4/STM32F40x_Vectors.s +++ /dev/null @@ -1,817 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * VECTORS_IN_RAM * - * * - * If defined, an area of RAM will large enough to store the vector table * - * will be reserved. * - * * - *****************************************************************************/ - - .syntax unified - .code 16 - - .section .init, "ax" - .align 0 - -/***************************************************************************** - * Default Exception Handlers * - *****************************************************************************/ - - .thumb_func - .weak NMI_Handler -NMI_Handler: - b . - - .thumb_func - .weak HardFault_Handler -HardFault_Handler: - b . - - .thumb_func - .weak SVC_Handler -SVC_Handler: - b . - - .thumb_func - .weak PendSV_Handler -PendSV_Handler: - b . - - .thumb_func - .weak SysTick_Handler -SysTick_Handler: - b . - - .thumb_func -Dummy_Handler: - b . - -#if defined(__OPTIMIZATION_SMALL) - - .weak WWDG_IRQHandler - .thumb_set WWDG_IRQHandler,Dummy_Handler - - .weak PVD_IRQHandler - .thumb_set PVD_IRQHandler,Dummy_Handler - - .weak TAMP_STAMP_IRQHandler - .thumb_set TAMP_STAMP_IRQHandler,Dummy_Handler - - .weak RTC_WKUP_IRQHandler - .thumb_set RTC_WKUP_IRQHandler,Dummy_Handler - - .weak RCC_IRQHandler - .thumb_set RCC_IRQHandler,Dummy_Handler - - .weak EXTI0_IRQHandler - .thumb_set EXTI0_IRQHandler,Dummy_Handler - - .weak EXTI1_IRQHandler - .thumb_set EXTI1_IRQHandler,Dummy_Handler - - .weak EXTI2_IRQHandler - .thumb_set EXTI2_IRQHandler,Dummy_Handler - - .weak EXTI3_IRQHandler - .thumb_set EXTI3_IRQHandler,Dummy_Handler - - .weak EXTI4_IRQHandler - .thumb_set EXTI4_IRQHandler,Dummy_Handler - - .weak DMA1_Stream0_IRQHandler - .thumb_set DMA1_Stream0_IRQHandler,Dummy_Handler - - .weak DMA1_Stream1_IRQHandler - .thumb_set DMA1_Stream1_IRQHandler,Dummy_Handler - - .weak DMA1_Stream2_IRQHandler - .thumb_set DMA1_Stream2_IRQHandler,Dummy_Handler - - .weak DMA1_Stream3_IRQHandler - .thumb_set DMA1_Stream3_IRQHandler,Dummy_Handler - - .weak DMA1_Stream4_IRQHandler - .thumb_set DMA1_Stream4_IRQHandler,Dummy_Handler - - .weak DMA1_Stream5_IRQHandler - .thumb_set DMA1_Stream5_IRQHandler,Dummy_Handler - - .weak DMA1_Stream6_IRQHandler - .thumb_set DMA1_Stream6_IRQHandler,Dummy_Handler - - .weak ADC_IRQHandler - .thumb_set ADC_IRQHandler,Dummy_Handler - - .weak CAN1_TX_IRQHandler - .thumb_set CAN1_TX_IRQHandler,Dummy_Handler - - .weak CAN1_RX0_IRQHandler - .thumb_set CAN1_RX0_IRQHandler,Dummy_Handler - - .weak CAN1_RX1_IRQHandler - .thumb_set CAN1_RX1_IRQHandler,Dummy_Handler - - .weak CAN1_SCE_IRQHandler - .thumb_set CAN1_SCE_IRQHandler,Dummy_Handler - - .weak EXTI9_5_IRQHandler - .thumb_set EXTI9_5_IRQHandler,Dummy_Handler - - .weak TIM1_BRK_TIM9_IRQHandler - .thumb_set TIM1_BRK_TIM9_IRQHandler,Dummy_Handler - - .weak TIM1_UP_TIM10_IRQHandler - .thumb_set TIM1_UP_TIM10_IRQHandler,Dummy_Handler - - .weak TIM1_TRG_COM_TIM11_IRQHandler - .thumb_set TIM1_TRG_COM_TIM11_IRQHandler,Dummy_Handler - - .weak TIM1_CC_IRQHandler - .thumb_set TIM1_CC_IRQHandler,Dummy_Handler - - .weak TIM2_IRQHandler - .thumb_set TIM2_IRQHandler,Dummy_Handler - - .weak TIM3_IRQHandler - .thumb_set TIM3_IRQHandler,Dummy_Handler - - .weak TIM4_IRQHandler - .thumb_set TIM4_IRQHandler,Dummy_Handler - - .weak I2C1_EV_IRQHandler - .thumb_set I2C1_EV_IRQHandler,Dummy_Handler - - .weak I2C1_ER_IRQHandler - .thumb_set I2C1_ER_IRQHandler,Dummy_Handler - - .weak I2C2_EV_IRQHandler - .thumb_set I2C2_EV_IRQHandler,Dummy_Handler - - .weak I2C2_ER_IRQHandler - .thumb_set I2C2_ER_IRQHandler,Dummy_Handler - - .weak SPI1_IRQHandler - .thumb_set SPI1_IRQHandler,Dummy_Handler - - .weak SPI2_IRQHandler - .thumb_set SPI2_IRQHandler,Dummy_Handler - - .weak USART1_IRQHandler - .thumb_set USART1_IRQHandler,Dummy_Handler - - .weak USART2_IRQHandler - .thumb_set USART2_IRQHandler,Dummy_Handler - - .weak USART3_IRQHandler - .thumb_set USART3_IRQHandler,Dummy_Handler - - .weak EXTI15_10_IRQHandler - .thumb_set EXTI15_10_IRQHandler,Dummy_Handler - - .weak RTC_Alarm_IRQHandler - .thumb_set RTC_Alarm_IRQHandler,Dummy_Handler - - .weak OTG_FS_WKUP_IRQHandler - .thumb_set OTG_FS_WKUP_IRQHandler,Dummy_Handler - - .weak TIM8_BRK_TIM12_IRQHandler - .thumb_set TIM8_BRK_TIM12_IRQHandler,Dummy_Handler - - .weak TIM8_UP_TIM13_IRQHandler - .thumb_set TIM8_UP_TIM13_IRQHandler,Dummy_Handler - - .weak TIM8_TRG_COM_TIM14_IRQHandler - .thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Dummy_Handler - - .weak TIM8_CC_IRQHandler - .thumb_set TIM8_CC_IRQHandler,Dummy_Handler - - .weak DMA1_Stream7_IRQHandler - .thumb_set DMA1_Stream7_IRQHandler,Dummy_Handler - - .weak FSMC_IRQHandler - .thumb_set FSMC_IRQHandler,Dummy_Handler - - .weak SDIO_IRQHandler - .thumb_set SDIO_IRQHandler,Dummy_Handler - - .weak TIM5_IRQHandler - .thumb_set TIM5_IRQHandler,Dummy_Handler - - .weak SPI3_IRQHandler - .thumb_set SPI3_IRQHandler,Dummy_Handler - - .weak UART4_IRQHandler - .thumb_set UART4_IRQHandler,Dummy_Handler - - .weak UART5_IRQHandler - .thumb_set UART5_IRQHandler,Dummy_Handler - - .weak TIM6_DAC_IRQHandler - .thumb_set TIM6_DAC_IRQHandler,Dummy_Handler - - .weak TIM7_IRQHandler - .thumb_set TIM7_IRQHandler,Dummy_Handler - - .weak DMA2_Stream0_IRQHandler - .thumb_set DMA2_Stream0_IRQHandler,Dummy_Handler - - .weak DMA2_Stream1_IRQHandler - .thumb_set DMA2_Stream1_IRQHandler,Dummy_Handler - - .weak DMA2_Stream2_IRQHandler - .thumb_set DMA2_Stream2_IRQHandler,Dummy_Handler - - .weak DMA2_Stream3_IRQHandler - .thumb_set DMA2_Stream3_IRQHandler,Dummy_Handler - - .weak DMA2_Stream4_IRQHandler - .thumb_set DMA2_Stream4_IRQHandler,Dummy_Handler - - .weak ETH_IRQHandler - .thumb_set ETH_IRQHandler,Dummy_Handler - - .weak ETH_WKUP_IRQHandler - .thumb_set ETH_WKUP_IRQHandler,Dummy_Handler - - .weak CAN2_TX_IRQHandler - .thumb_set CAN2_TX_IRQHandler,Dummy_Handler - - .weak CAN2_RX0_IRQHandler - .thumb_set CAN2_RX0_IRQHandler,Dummy_Handler - - .weak CAN2_RX1_IRQHandler - .thumb_set CAN2_RX1_IRQHandler,Dummy_Handler - - .weak CAN2_SCE_IRQHandler - .thumb_set CAN2_SCE_IRQHandler,Dummy_Handler - - .weak OTG_FS_IRQHandler - .thumb_set OTG_FS_IRQHandler,Dummy_Handler - - .weak DMA2_Stream5_IRQHandler - .thumb_set DMA2_Stream5_IRQHandler,Dummy_Handler - - .weak DMA2_Stream6_IRQHandler - .thumb_set DMA2_Stream6_IRQHandler,Dummy_Handler - - .weak DMA2_Stream7_IRQHandler - .thumb_set DMA2_Stream7_IRQHandler,Dummy_Handler - - .weak USART6_IRQHandler - .thumb_set USART6_IRQHandler,Dummy_Handler - - .weak I2C3_EV_IRQHandler - .thumb_set I2C3_EV_IRQHandler,Dummy_Handler - - .weak I2C3_ER_IRQHandler - .thumb_set I2C3_ER_IRQHandler,Dummy_Handler - - .weak OTG_HS_EP1_OUT_IRQHandler - .thumb_set OTG_HS_EP1_OUT_IRQHandler,Dummy_Handler - - .weak OTG_HS_EP1_IN_IRQHandler - .thumb_set OTG_HS_EP1_IN_IRQHandler,Dummy_Handler - - .weak OTG_HS_WKUP_IRQHandler - .thumb_set OTG_HS_WKUP_IRQHandler,Dummy_Handler - - .weak OTG_HS_IRQHandler - .thumb_set OTG_HS_IRQHandler,Dummy_Handler - - .weak DCMI_IRQHandler - .thumb_set DCMI_IRQHandler,Dummy_Handler - - .weak FPU_IRQHandler - .thumb_set FPU_IRQHandler,Dummy_Handler - -#else - - .thumb_func - .weak WWDG_IRQHandler -WWDG_IRQHandler: - b . - - .thumb_func - .weak PVD_IRQHandler -PVD_IRQHandler: - b . - - .thumb_func - .weak TAMP_STAMP_IRQHandler -TAMP_STAMP_IRQHandler: - b . - - .thumb_func - .weak RTC_WKUP_IRQHandler -RTC_WKUP_IRQHandler: - b . - - .thumb_func - .weak RCC_IRQHandler -RCC_IRQHandler: - b . - - .thumb_func - .weak EXTI0_IRQHandler -EXTI0_IRQHandler: - b . - - .thumb_func - .weak EXTI1_IRQHandler -EXTI1_IRQHandler: - b . - - .thumb_func - .weak EXTI2_IRQHandler -EXTI2_IRQHandler: - b . - - .thumb_func - .weak EXTI3_IRQHandler -EXTI3_IRQHandler: - b . - - .thumb_func - .weak EXTI4_IRQHandler -EXTI4_IRQHandler: - b . - - .thumb_func - .weak DMA1_Stream0_IRQHandler -DMA1_Stream0_IRQHandler: - b . - - .thumb_func - .weak DMA1_Stream1_IRQHandler -DMA1_Stream1_IRQHandler: - b . - - .thumb_func - .weak DMA1_Stream2_IRQHandler -DMA1_Stream2_IRQHandler: - b . - - .thumb_func - .weak DMA1_Stream3_IRQHandler -DMA1_Stream3_IRQHandler: - b . - - .thumb_func - .weak DMA1_Stream4_IRQHandler -DMA1_Stream4_IRQHandler: - b . - - .thumb_func - .weak DMA1_Stream5_IRQHandler -DMA1_Stream5_IRQHandler: - b . - - .thumb_func - .weak DMA1_Stream6_IRQHandler -DMA1_Stream6_IRQHandler: - b . - - .thumb_func - .weak ADC_IRQHandler -ADC_IRQHandler: - b . - - .thumb_func - .weak CAN1_TX_IRQHandler -CAN1_TX_IRQHandler: - b . - - .thumb_func - .weak CAN1_RX0_IRQHandler -CAN1_RX0_IRQHandler: - b . - - .thumb_func - .weak CAN1_RX1_IRQHandler -CAN1_RX1_IRQHandler: - b . - - .thumb_func - .weak CAN1_SCE_IRQHandler -CAN1_SCE_IRQHandler: - b . - - .thumb_func - .weak EXTI9_5_IRQHandler -EXTI9_5_IRQHandler: - b . - - .thumb_func - .weak TIM1_BRK_TIM9_IRQHandler -TIM1_BRK_TIM9_IRQHandler: - b . - - .thumb_func - .weak TIM1_UP_TIM10_IRQHandler -TIM1_UP_TIM10_IRQHandler: - b . - - .thumb_func - .weak TIM1_TRG_COM_TIM11_IRQHandler -TIM1_TRG_COM_TIM11_IRQHandler: - b . - - .thumb_func - .weak TIM1_CC_IRQHandler -TIM1_CC_IRQHandler: - b . - - .thumb_func - .weak TIM2_IRQHandler -TIM2_IRQHandler: - b . - - .thumb_func - .weak TIM3_IRQHandler -TIM3_IRQHandler: - b . - - .thumb_func - .weak TIM4_IRQHandler -TIM4_IRQHandler: - b . - - .thumb_func - .weak I2C1_EV_IRQHandler -I2C1_EV_IRQHandler: - b . - - .thumb_func - .weak I2C1_ER_IRQHandler -I2C1_ER_IRQHandler: - b . - - .thumb_func - .weak I2C2_EV_IRQHandler -I2C2_EV_IRQHandler: - b . - - .thumb_func - .weak I2C2_ER_IRQHandler -I2C2_ER_IRQHandler: - b . - - .thumb_func - .weak SPI1_IRQHandler -SPI1_IRQHandler: - b . - - .thumb_func - .weak SPI2_IRQHandler -SPI2_IRQHandler: - b . - - .thumb_func - .weak USART1_IRQHandler -USART1_IRQHandler: - b . - - .thumb_func - .weak USART2_IRQHandler -USART2_IRQHandler: - b . - - .thumb_func - .weak USART3_IRQHandler -USART3_IRQHandler: - b . - - .thumb_func - .weak EXTI15_10_IRQHandler -EXTI15_10_IRQHandler: - b . - - .thumb_func - .weak RTC_Alarm_IRQHandler -RTC_Alarm_IRQHandler: - b . - - .thumb_func - .weak OTG_FS_WKUP_IRQHandler -OTG_FS_WKUP_IRQHandler: - b . - - .thumb_func - .weak TIM8_BRK_TIM12_IRQHandler -TIM8_BRK_TIM12_IRQHandler: - b . - - .thumb_func - .weak TIM8_UP_TIM13_IRQHandler -TIM8_UP_TIM13_IRQHandler: - b . - - .thumb_func - .weak TIM8_TRG_COM_TIM14_IRQHandler -TIM8_TRG_COM_TIM14_IRQHandler: - b . - - .thumb_func - .weak TIM8_CC_IRQHandler -TIM8_CC_IRQHandler: - b . - - .thumb_func - .weak DMA1_Stream7_IRQHandler -DMA1_Stream7_IRQHandler: - b . - - .thumb_func - .weak FSMC_IRQHandler -FSMC_IRQHandler: - b . - - .thumb_func - .weak SDIO_IRQHandler -SDIO_IRQHandler: - b . - - .thumb_func - .weak TIM5_IRQHandler -TIM5_IRQHandler: - b . - - .thumb_func - .weak SPI3_IRQHandler -SPI3_IRQHandler: - b . - - .thumb_func - .weak UART4_IRQHandler -UART4_IRQHandler: - b . - - .thumb_func - .weak UART5_IRQHandler -UART5_IRQHandler: - b . - - .thumb_func - .weak TIM6_DAC_IRQHandler -TIM6_DAC_IRQHandler: - b . - - .thumb_func - .weak TIM7_IRQHandler -TIM7_IRQHandler: - b . - - .thumb_func - .weak DMA2_Stream0_IRQHandler -DMA2_Stream0_IRQHandler: - b . - - .thumb_func - .weak DMA2_Stream1_IRQHandler -DMA2_Stream1_IRQHandler: - b . - - .thumb_func - .weak DMA2_Stream2_IRQHandler -DMA2_Stream2_IRQHandler: - b . - - .thumb_func - .weak DMA2_Stream3_IRQHandler -DMA2_Stream3_IRQHandler: - b . - - .thumb_func - .weak DMA2_Stream4_IRQHandler -DMA2_Stream4_IRQHandler: - b . - - .thumb_func - .weak ETH_IRQHandler -ETH_IRQHandler: - b . - - .thumb_func - .weak ETH_WKUP_IRQHandler -ETH_WKUP_IRQHandler: - b . - - .thumb_func - .weak CAN2_TX_IRQHandler -CAN2_TX_IRQHandler: - b . - - .thumb_func - .weak CAN2_RX0_IRQHandler -CAN2_RX0_IRQHandler: - b . - - .thumb_func - .weak CAN2_RX1_IRQHandler -CAN2_RX1_IRQHandler: - b . - - .thumb_func - .weak CAN2_SCE_IRQHandler -CAN2_SCE_IRQHandler: - b . - - .thumb_func - .weak OTG_FS_IRQHandler -OTG_FS_IRQHandler: - b . - - .thumb_func - .weak DMA2_Stream5_IRQHandler -DMA2_Stream5_IRQHandler: - b . - - .thumb_func - .weak DMA2_Stream6_IRQHandler -DMA2_Stream6_IRQHandler: - b . - - .thumb_func - .weak DMA2_Stream7_IRQHandler -DMA2_Stream7_IRQHandler: - b . - - .thumb_func - .weak USART6_IRQHandler -USART6_IRQHandler: - b . - - .thumb_func - .weak I2C3_EV_IRQHandler -I2C3_EV_IRQHandler: - b . - - .thumb_func - .weak I2C3_ER_IRQHandler -I2C3_ER_IRQHandler: - b . - - .thumb_func - .weak OTG_HS_EP1_OUT_IRQHandler -OTG_HS_EP1_OUT_IRQHandler: - b . - - .thumb_func - .weak OTG_HS_EP1_IN_IRQHandler -OTG_HS_EP1_IN_IRQHandler: - b . - - .thumb_func - .weak OTG_HS_WKUP_IRQHandler -OTG_HS_WKUP_IRQHandler: - b . - - .thumb_func - .weak OTG_HS_IRQHandler -OTG_HS_IRQHandler: - b . - - .thumb_func - .weak DCMI_IRQHandler -DCMI_IRQHandler: - b . - - .thumb_func - .weak FPU_IRQHandler -FPU_IRQHandler: - b . - -#endif - -/***************************************************************************** - * Vector Table * - *****************************************************************************/ - - .section .vectors, "ax" - .align 0 - .global _vectors - .extern __stack_end__ - .extern Reset_Handler - -_vectors: - .word __stack_end__ - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word SVC_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word PendSV_Handler - .word SysTick_Handler - .word WWDG_IRQHandler - .word PVD_IRQHandler - .word TAMP_STAMP_IRQHandler - .word RTC_WKUP_IRQHandler - .word Dummy_Handler /* Reserved */ - .word RCC_IRQHandler - .word EXTI0_IRQHandler - .word EXTI1_IRQHandler - .word EXTI2_IRQHandler - .word EXTI3_IRQHandler - .word EXTI4_IRQHandler - .word DMA1_Stream0_IRQHandler - .word DMA1_Stream1_IRQHandler - .word DMA1_Stream2_IRQHandler - .word DMA1_Stream3_IRQHandler - .word DMA1_Stream4_IRQHandler - .word DMA1_Stream5_IRQHandler - .word DMA1_Stream6_IRQHandler - .word ADC_IRQHandler - .word CAN1_TX_IRQHandler - .word CAN1_RX0_IRQHandler - .word CAN1_RX1_IRQHandler - .word CAN1_SCE_IRQHandler - .word EXTI9_5_IRQHandler - .word TIM1_BRK_TIM9_IRQHandler - .word TIM1_UP_TIM10_IRQHandler - .word TIM1_TRG_COM_TIM11_IRQHandler - .word TIM1_CC_IRQHandler - .word TIM2_IRQHandler - .word TIM3_IRQHandler - .word TIM4_IRQHandler - .word I2C1_EV_IRQHandler - .word I2C1_ER_IRQHandler - .word I2C2_EV_IRQHandler - .word I2C2_ER_IRQHandler - .word SPI1_IRQHandler - .word SPI2_IRQHandler - .word USART1_IRQHandler - .word USART2_IRQHandler - .word USART3_IRQHandler - .word EXTI15_10_IRQHandler - .word RTC_Alarm_IRQHandler - .word OTG_FS_WKUP_IRQHandler - .word TIM8_BRK_TIM12_IRQHandler - .word TIM8_UP_TIM13_IRQHandler - .word TIM8_TRG_COM_TIM14_IRQHandler - .word TIM8_CC_IRQHandler - .word DMA1_Stream7_IRQHandler - .word FSMC_IRQHandler - .word SDIO_IRQHandler - .word TIM5_IRQHandler - .word SPI3_IRQHandler - .word UART4_IRQHandler - .word UART5_IRQHandler - .word TIM6_DAC_IRQHandler - .word TIM7_IRQHandler - .word DMA2_Stream0_IRQHandler - .word DMA2_Stream1_IRQHandler - .word DMA2_Stream2_IRQHandler - .word DMA2_Stream3_IRQHandler - .word DMA2_Stream4_IRQHandler - .word ETH_IRQHandler - .word ETH_WKUP_IRQHandler - .word CAN2_TX_IRQHandler - .word CAN2_RX0_IRQHandler - .word CAN2_RX1_IRQHandler - .word CAN2_SCE_IRQHandler - .word OTG_FS_IRQHandler - .word DMA2_Stream5_IRQHandler - .word DMA2_Stream6_IRQHandler - .word DMA2_Stream7_IRQHandler - .word USART6_IRQHandler - .word I2C3_EV_IRQHandler - .word I2C3_ER_IRQHandler - .word OTG_HS_EP1_OUT_IRQHandler - .word OTG_HS_EP1_IN_IRQHandler - .word OTG_HS_WKUP_IRQHandler - .word OTG_HS_IRQHandler - .word DCMI_IRQHandler - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word FPU_IRQHandler -_vectors_end: - -#ifdef VECTORS_IN_RAM - .section .vectors_ram, "ax" - .align 0 - .global _vectors_ram - -_vectors_ram: - .space _vectors_end - _vectors, 0 -#endif diff --git a/examples/device/cdc_msc/ses/stm32f4/STM32F4xx_Startup.s b/examples/device/cdc_msc/ses/stm32f4/STM32F4xx_Startup.s deleted file mode 100644 index 42415cbb..00000000 --- a/examples/device/cdc_msc/ses/stm32f4/STM32F4xx_Startup.s +++ /dev/null @@ -1,125 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * NO_FPU_ENABLE * - * * - * If defined, FPU will not be enabled. * - * * - * NO_STACK_INIT * - * * - * If defined, the stack pointer will not be initialised. * - * * - * NO_SYSTEM_INIT * - * * - * If defined, the SystemInit() function will not be called. By default * - * SystemInit() is called after reset to enable the clocks and memories to * - * be initialised prior to any C startup initialisation. * - * * - * NO_VTOR_CONFIG * - * * - * If defined, the vector table offset register will not be configured. * - * * - * MEMORY_INIT * - * * - * If defined, the MemoryInit() function will be called. By default * - * MemoryInit() is called after SystemInit() to enable an external memory * - * controller. * - * * - * STACK_INIT_VAL * - * * - * If defined, specifies the initial stack pointer value. If undefined, * - * the stack pointer will be initialised to point to the end of the * - * RAM segment. * - * * - * VECTORS_IN_RAM * - * * - * If defined, the exception vectors will be copied from Flash to RAM. * - * * - *****************************************************************************/ - - .syntax unified - - .global Reset_Handler - .extern _vectors - - .section .init, "ax" - .thumb_func - - .equ VTOR_REG, 0xE000ED08 - .equ FPU_CPACR_REG, 0xE000ED88 - -#ifndef STACK_INIT_VAL -#define STACK_INIT_VAL __RAM_segment_end__ -#endif - -Reset_Handler: -#ifndef NO_STACK_INIT - /* Initialise main stack */ - ldr r0, =STACK_INIT_VAL - bic r0, #0x7 - mov sp, r0 -#endif - -#ifndef NO_SYSTEM_INIT - /* Initialise system */ - ldr r0, =SystemInit - blx r0 -#endif - -#ifdef MEMORY_INIT - ldr r0, =MemoryInit - blx r0 -#endif - -#ifdef VECTORS_IN_RAM - /* Copy exception vectors into RAM */ - ldr r0, =__vectors_start__ - ldr r1, =__vectors_end__ - ldr r2, =__vectors_ram_start__ -1: - cmp r0, r1 - beq 2f - ldr r3, [r0] - str r3, [r2] - adds r0, r0, #4 - adds r2, r2, #4 - b 1b -2: -#endif - -#ifndef NO_VTOR_CONFIG - /* Configure vector table offset register */ - ldr r0, =VTOR_REG -#ifdef VECTORS_IN_RAM - ldr r1, =_vectors_ram -#else - ldr r1, =_vectors -#endif - str r1, [r0] -#endif - -#if (defined(__ARM_ARCH_FPV4_SP_D16__) || defined(__ARM_ARCH_FPV5_D16__)) && !defined(NO_FPU_ENABLE) - /* Enable FPU */ - ldr r0, =FPU_CPACR_REG - ldr r1, [r0] - orr r1, r1, #(0xF << 20) - str r1, [r0] - dsb - isb -#endif - - /* Jump to program start */ - b _start - - diff --git a/examples/device/cdc_msc/ses/stm32f4/STM32F4xx_Target.js b/examples/device/cdc_msc/ses/stm32f4/STM32F4xx_Target.js deleted file mode 100644 index 20560af4..00000000 --- a/examples/device/cdc_msc/ses/stm32f4/STM32F4xx_Target.js +++ /dev/null @@ -1,19 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -function Reset() { - TargetInterface.resetAndStop(); -} - -function EnableTrace(traceInterfaceType) { - // TODO: Enable trace -} - diff --git a/examples/device/cdc_msc/ses/stm32f4/flash_placement.xml b/examples/device/cdc_msc/ses/stm32f4/flash_placement.xml deleted file mode 100644 index 79bedc53..00000000 --- a/examples/device/cdc_msc/ses/stm32f4/flash_placement.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/stm32f4/stm32f4.emProject b/examples/device/cdc_msc/ses/stm32f4/stm32f4.emProject deleted file mode 100644 index 23b31347..00000000 --- a/examples/device/cdc_msc/ses/stm32f4/stm32f4.emProject +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc/ses/stm32f4/thumb_crt0.s b/examples/device/cdc_msc/ses/stm32f4/thumb_crt0.s deleted file mode 100644 index 17f88e0c..00000000 --- a/examples/device/cdc_msc/ses/stm32f4/thumb_crt0.s +++ /dev/null @@ -1,415 +0,0 @@ -// ********************************************************************** -// * SEGGER Microcontroller GmbH * -// * The Embedded Experts * -// ********************************************************************** -// * * -// * (c) 2014 - 2018 SEGGER Microcontroller GmbH * -// * (c) 2001 - 2018 Rowley Associates Limited * -// * * -// * www.segger.com Support: support@segger.com * -// * * -// ********************************************************************** -// * * -// * All rights reserved. * -// * * -// * Redistribution and use in source and binary forms, with or * -// * without modification, are permitted provided that the following * -// * conditions are met: * -// * * -// * - Redistributions of source code must retain the above copyright * -// * notice, this list of conditions and the following disclaimer. * -// * * -// * - Neither the name of SEGGER Microcontroller GmbH * -// * nor the names of its contributors may be used to endorse or * -// * promote products derived from this software without specific * -// * prior written permission. * -// * * -// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -// * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -// * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -// * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -// * DISCLAIMED. * -// * IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -// * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -// * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -// * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -// * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -// * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -// * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -// * DAMAGE. * -// * * -// ********************************************************************** -// -// -// Preprocessor Definitions -// ------------------------ -// APP_ENTRY_POINT -// -// Defines the application entry point function, if undefined this setting -// defaults to "main". -// -// INITIALIZE_STACK -// -// If defined, the contents of the stack will be initialized to a the -// value 0xCC. -// -// INITIALIZE_SECONDARY_SECTIONS -// -// If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized. -// -// INITIALIZE_TCM_SECTIONS -// -// If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections -// will be initialized. -// -// INITIALIZE_USER_SECTIONS -// -// If defined, the function InitializeUserMemorySections will be called prior -// to entering main in order to allow the user to initialize any user defined -// memory sections. -// -// FULL_LIBRARY -// -// If defined then -// - argc, argv are setup by the debug_getargs. -// - the exit symbol is defined and executes on return from main. -// - the exit symbol calls destructors, atexit functions and then debug_exit. -// -// If not defined then -// - argc and argv are zero. -// - the exit symbol is defined, executes on return from main and loops -// - -#ifndef APP_ENTRY_POINT -#define APP_ENTRY_POINT main -#endif - -#ifndef ARGSSPACE -#define ARGSSPACE 128 -#endif - .syntax unified - - .global _start - .extern APP_ENTRY_POINT - .global exit - .weak exit - -#ifdef INITIALIZE_USER_SECTIONS - .extern InitializeUserMemorySections -#endif - - .section .init, "ax" - .code 16 - .balign 2 - .thumb_func - -_start: - /* Set up main stack if size > 0 */ - ldr r1, =__stack_end__ - ldr r0, =__stack_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - mov sp, r1 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - ldr r0, =__stack_start__ - bl memory_set -#endif -1: - - /* Set up process stack if size > 0 */ - ldr r1, =__stack_process_end__ - ldr r0, =__stack_process_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - msr psp, r1 - movs r2, #2 - msr control, r2 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - bl memory_set -#endif -1: - - /* Copy initialized memory sections into RAM (if necessary). */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl memory_copy - ldr r0, =__tdata_load_start__ - ldr r1, =__tdata_start__ - ldr r2, =__tdata_end__ - bl memory_copy -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__data2_load_start__ - ldr r1, =__data2_start__ - ldr r2, =__data2_end__ - bl memory_copy - ldr r0, =__text2_load_start__ - ldr r1, =__text2_start__ - ldr r2, =__text2_end__ - bl memory_copy - ldr r0, =__rodata2_load_start__ - ldr r1, =__rodata2_start__ - ldr r2, =__rodata2_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__data_tcm_load_start__ - ldr r1, =__data_tcm_start__ - ldr r2, =__data_tcm_end__ - bl memory_copy - ldr r0, =__text_tcm_load_start__ - ldr r1, =__text_tcm_start__ - ldr r2, =__text_tcm_end__ - bl memory_copy - ldr r0, =__rodata_tcm_load_start__ - ldr r1, =__rodata_tcm_start__ - ldr r2, =__rodata_tcm_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Zero the bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - movs r2, #0 - bl memory_set - ldr r0, =__tbss_start__ - ldr r1, =__tbss_end__ - movs r2, #0 - bl memory_set -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__bss2_start__ - ldr r1, =__bss2_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__bss_tcm_start__ - ldr r1, =__bss_tcm_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Initialize the heap */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - subs r1, r1, r0 - cmp r1, #8 - blt 1f - movs r2, #0 - str r2, [r0] - adds r0, r0, #4 - str r1, [r0] -1: - -#ifdef INITIALIZE_USER_SECTIONS - ldr r2, =InitializeUserMemorySections - blx r2 -#endif - - /* Call constructors */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -ctor_loop: - cmp r0, r1 - beq ctor_end - ldr r2, [r0] - adds r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b ctor_loop -ctor_end: - - /* Setup initial call frame */ - movs r0, #0 - mov lr, r0 - mov r12, sp - - .type start, function -start: - /* Jump to application entry point */ -#ifdef FULL_LIBRARY - movs r0, #ARGSSPACE - ldr r1, =args - ldr r2, =debug_getargs - blx r2 - ldr r1, =args -#else - movs r0, #0 - movs r1, #0 -#endif - ldr r2, =APP_ENTRY_POINT - blx r2 - - .thumb_func -exit: -#ifdef FULL_LIBRARY - mov r5, r0 // save the exit parameter/return result - - /* Call destructors */ - ldr r0, =__dtors_start__ - ldr r1, =__dtors_end__ -dtor_loop: - cmp r0, r1 - beq dtor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b dtor_loop -dtor_end: - - /* Call atexit functions */ - ldr r2, =_execute_at_exit_fns - blx r2 - - /* Call debug_exit with return result/exit parameter */ - mov r0, r5 - ldr r2, =debug_exit - blx r2 -#endif - - /* Returned from application entry point, loop forever. */ -exit_loop: - b exit_loop - - .thumb_func -memory_copy: - cmp r0, r1 - beq 2f - subs r2, r2, r1 - beq 2f -1: - ldrb r3, [r0] - adds r0, r0, #1 - strb r3, [r1] - adds r1, r1, #1 - subs r2, r2, #1 - bne 1b -2: - bx lr - - .thumb_func -memory_set: - cmp r0, r1 - beq 1f - strb r2, [r0] - adds r0, r0, #1 - b memory_set -1: - bx lr - - // default C/C++ library helpers - -.macro HELPER helper_name - .section .text.\helper_name, "ax", %progbits - .balign 2 - .global \helper_name - .weak \helper_name -\helper_name: - .thumb_func -.endm - -.macro JUMPTO name -#if defined(__thumb__) && !defined(__thumb2__) - mov r12, r0 - ldr r0, =\name - push {r0} - mov r0, r12 - pop {pc} -#else - b \name -#endif -.endm - -HELPER __aeabi_read_tp - ldr r0, =__tbss_start__-8 - bx lr -HELPER abort - b . -HELPER __assert - b . -HELPER __aeabi_assert - b . -HELPER __sync_synchronize - bx lr -HELPER __getchar - JUMPTO debug_getchar -HELPER __putchar - JUMPTO debug_putchar -HELPER __open - JUMPTO debug_fopen -HELPER __close - JUMPTO debug_fclose -HELPER __write - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fwrite -HELPER __read - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fread -HELPER __seek - push {r4, lr} - mov r4, r0 - bl debug_fseek - cmp r0, #0 - bne 1f - mov r0, r4 - bl debug_ftell - pop {r4, pc} -1: - ldr r0, =-1 - pop {r4, pc} - // char __user_locale_name_buffer[]; - .section .bss.__user_locale_name_buffer, "aw", %nobits - .global __user_locale_name_buffer - .weak __user_locale_name_buffer - __user_locale_name_buffer: - .word 0x0 - -#ifdef FULL_LIBRARY - .bss -args: - .space ARGSSPACE -#endif - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - diff --git a/examples/device/cdc_msc_freertos/ses/cdc_msc_hid_freertos.emProject b/examples/device/cdc_msc_freertos/ses/cdc_msc_hid_freertos.emProject deleted file mode 100644 index acd8e98c..00000000 --- a/examples/device/cdc_msc_freertos/ses/cdc_msc_hid_freertos.emProject +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/FreeRTOSConfig.h b/examples/device/cdc_msc_freertos/ses/lpc175x_6x/FreeRTOSConfig.h deleted file mode 100644 index 5d3ba479..00000000 --- a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/FreeRTOSConfig.h +++ /dev/null @@ -1,134 +0,0 @@ -#ifndef __FREERTOS_CONFIG__H -#define __FREERTOS_CONFIG__H - -//--------------------------------------------------------------------+ -// See http://www.freertos.org/a00110.html. -//--------------------------------------------------------------------+ -#include "chip.h" - -#define configCPU_CLOCK_HZ SystemCoreClock - -#if 0 -#if CFG_TUSB_MCU == OPT_MCU_LPC43XX - // TODO remove - #include "lpc43xx_cgu.h" - #define configCPU_CLOCK_HZ CGU_GetPCLKFrequency(CGU_PERIPHERAL_M4CORE) -#endif -#endif - -#define configUSE_PREEMPTION 1 -#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0 -#define configTICK_RATE_HZ ( 1000 ) -#define configMAX_PRIORITIES (8) -#define configMINIMAL_STACK_SIZE (128 ) -#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 16*1024 ) ) -#define configMAX_TASK_NAME_LEN 32 -#define configUSE_16_BIT_TICKS 0 -#define configIDLE_SHOULD_YIELD 1 -#define configUSE_MUTEXES 1 -#define configUSE_RECURSIVE_MUTEXES 0 -#define configUSE_COUNTING_SEMAPHORES 1 -#define configQUEUE_REGISTRY_SIZE 10 // used to name queue/semaphore with debugger -#define configUSE_QUEUE_SETS 0 -#define configUSE_TIME_SLICING 0 -#define configUSE_NEWLIB_REENTRANT 0 -#define configENABLE_BACKWARD_COMPATIBILITY 1 - -#define configSUPPORT_STATIC_ALLOCATION 1 -#define configSUPPORT_DYNAMIC_ALLOCATION 1 - -/* Hook function related definitions. */ -#define configUSE_IDLE_HOOK 0 -#define configUSE_TICK_HOOK 0 -#define configUSE_MALLOC_FAILED_HOOK 1 -#define configCHECK_FOR_STACK_OVERFLOW 2 - -/* Run time and task stats gathering related definitions. */ -#define configGENERATE_RUN_TIME_STATS 0 -#define configUSE_TRACE_FACILITY 1 // legacy trace -#define configUSE_STATS_FORMATTING_FUNCTIONS 0 - -/* Co-routine definitions. */ -#define configUSE_CO_ROUTINES 0 -#define configMAX_CO_ROUTINE_PRIORITIES 2 - -/* Software timer related definitions. */ -#define configUSE_TIMERS 1 -#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 3 ) -#define configTIMER_QUEUE_LENGTH 10 -#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE - -/* Optional functions - most linkers will remove unused functions anyway. */ -#define INCLUDE_vTaskPrioritySet 0 -#define INCLUDE_uxTaskPriorityGet 0 -#define INCLUDE_vTaskDelete 0 -#define INCLUDE_vTaskSuspend 1 // required for queue, semaphore, mutex to be blocked indefinitely with portMAX_DELAY -#define INCLUDE_xResumeFromISR 0 -#define INCLUDE_vTaskDelayUntil 1 -#define INCLUDE_vTaskDelay 1 -#define INCLUDE_xTaskGetSchedulerState 0 -#define INCLUDE_xTaskGetCurrentTaskHandle 0 -#define INCLUDE_uxTaskGetStackHighWaterMark 0 -#define INCLUDE_xTaskGetIdleTaskHandle 0 -#define INCLUDE_xTimerGetTimerDaemonTaskHandle 0 -#define INCLUDE_pcTaskGetTaskName 0 -#define INCLUDE_eTaskGetState 0 -#define INCLUDE_xEventGroupSetBitFromISR 0 -#define INCLUDE_xTimerPendFunctionCall 0 - -/* Define to trap errors during development. */ - -// Halt CPU (breakpoint) when hitting error, only apply for Cortex M3, M4, M7 -#if defined(__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__) - -static inline void configASSERT_breakpoint(void) -{ - // Cortex M CoreDebug->DHCSR - volatile uint32_t* ARM_CM_DHCSR = ((volatile uint32_t*) 0xE000EDF0UL); - - // Only halt mcu if debugger is attached - if ( (*ARM_CM_DHCSR) & 1UL ) __asm("BKPT #0\n"); -} - -#else -#define configASSERT_breakpoint() -#endif - - -#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); configASSERT_breakpoint(); } - -/* FreeRTOS hooks to NVIC vectors */ -#define xPortPendSVHandler PendSV_Handler -#define xPortSysTickHandler SysTick_Handler -#define vPortSVCHandler SVC_Handler - -//--------------------------------------------------------------------+ -// Interrupt nesting behaviour configuration. -//--------------------------------------------------------------------+ -/* Cortex-M specific definitions. __NVIC_PRIO_BITS is defined in mcu_variant.h */ -#ifdef __NVIC_PRIO_BITS - #define configPRIO_BITS __NVIC_PRIO_BITS -#else - #error "This port requires __NVIC_PRIO_BITS to be defined" -#endif - - -/* The lowest interrupt priority that can be used in a call to a "set priority" -function. */ -#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 0x1f - -/* The highest interrupt priority that can be used by any interrupt service -routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL -INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER -PRIORITY THAN THIS! (higher priorities are lower numeric values. */ -#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 2 - -/* Interrupt priorities used by the kernel port layer itself. These are generic -to all Cortex-M ports, and do not rely on any particular library functions. */ -#define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) ) - -/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!! -See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ -#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) ) - -#endif /* __FREERTOS_CONFIG__H */ diff --git a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC1700_Startup.s b/examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC1700_Startup.s deleted file mode 100644 index f039ad93..00000000 --- a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC1700_Startup.s +++ /dev/null @@ -1,109 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2015 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * NO_STACK_INIT * - * * - * If defined, the stack pointer will not be initialised. * - * * - * NO_SYSTEM_INIT * - * * - * If defined, the SystemInit() function will not be called. By default * - * SystemInit() is called after reset to enable the clocks and memories to * - * be initialised prior to any C startup initialisation. * - * * - * NO_VTOR_CONFIG * - * * - * If defined, the vector table offset register will not be configured. * - * * - * MEMORY_INIT * - * * - * If defined, the MemoryInit() function will be called. By default * - * MemoryInit() is called after SystemInit() to enable an external memory * - * controller. * - * * - * STACK_INIT_VAL * - * * - * If defined, specifies the initial stack pointer value. If undefined, * - * the stack pointer will be initialised to point to the end of the * - * RAM segment. * - * * - * VECTORS_IN_RAM * - * * - * If defined, the exception vectors will be copied from Flash to RAM. * - * * - *****************************************************************************/ - - .syntax unified - - .global Reset_Handler - .extern _vectors - - .section .init, "ax" - .thumb_func - - .equ VTOR_REG, 0xE000ED08 - -#ifndef STACK_INIT_VAL -#define STACK_INIT_VAL __RAM_segment_end__ -#endif - -Reset_Handler: -#ifndef NO_STACK_INIT - /* Initialise main stack */ - ldr r0, =STACK_INIT_VAL - bic r0, #0x7 - mov sp, r0 -#endif -#ifndef NO_SYSTEM_INIT - /* Initialise system */ - ldr r0, =SystemInit - blx r0 -#endif - -#ifdef MEMORY_INIT - ldr r0, =MemoryInit - blx r0 -#endif - -#ifdef VECTORS_IN_RAM - /* Copy exception vectors into RAM */ - ldr r0, =__vectors_start__ - ldr r1, =__vectors_end__ - ldr r2, =__vectors_ram_start__ -1: - cmp r0, r1 - beq 2f - ldr r3, [r0] - str r3, [r2] - adds r0, r0, #4 - adds r2, r2, #4 - b 1b -2: -#endif - -#ifndef NO_VTOR_CONFIG - /* Configure vector table offset register */ - ldr r0, =VTOR_REG -#ifdef VECTORS_IN_RAM - ldr r1, =_vectors_ram -#else - ldr r1, =_vectors -#endif - str r1, [r0] -#endif - - /* Jump to program start */ - b _start - - diff --git a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC1700_Target.js b/examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC1700_Target.js deleted file mode 100644 index 7f945a3d..00000000 --- a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC1700_Target.js +++ /dev/null @@ -1,19 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2015 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -function Reset() { - TargetInterface.resetAndStop(); -} - -function EnableTrace(traceInterfaceType) { - // TODO: Enable trace -} - diff --git a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC1769_MemoryMap.xml b/examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC1769_MemoryMap.xml deleted file mode 100644 index d9c07aea..00000000 --- a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC1769_MemoryMap.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC176x5x_Registers.xml b/examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC176x5x_Registers.xml deleted file mode 100644 index fd38966b..00000000 --- a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC176x5x_Registers.xml +++ /dev/null @@ -1,11058 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC176x5x_Vectors.s b/examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC176x5x_Vectors.s deleted file mode 100644 index c5fae131..00000000 --- a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/LPC176x5x_Vectors.s +++ /dev/null @@ -1,418 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2015 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * VECTORS_IN_RAM * - * * - * If defined, an area of RAM will large enough to store the vector table * - * will be reserved. * - * * - *****************************************************************************/ - - .syntax unified - .code 16 - - .section .init, "ax" - .align 0 - -/***************************************************************************** - * Default Exception Handlers * - *****************************************************************************/ - - .thumb_func - .weak NMI_Handler -NMI_Handler: - b . - - .thumb_func - .weak HardFault_Handler -HardFault_Handler: - b . - - .thumb_func - .weak SVC_Handler -SVC_Handler: - b . - - .thumb_func - .weak PendSV_Handler -PendSV_Handler: - b . - - .thumb_func - .weak SysTick_Handler -SysTick_Handler: - b . - - .thumb_func -Dummy_Handler: - b . - -#if defined(__OPTIMIZATION_SMALL) - - .weak WDT_IRQHandler - .thumb_set WDT_IRQHandler,Dummy_Handler - - .weak TIMER0_IRQHandler - .thumb_set TIMER0_IRQHandler,Dummy_Handler - - .weak TIMER1_IRQHandler - .thumb_set TIMER1_IRQHandler,Dummy_Handler - - .weak TIMER2_IRQHandler - .thumb_set TIMER2_IRQHandler,Dummy_Handler - - .weak TIMER3_IRQHandler - .thumb_set TIMER3_IRQHandler,Dummy_Handler - - .weak UART0_IRQHandler - .thumb_set UART0_IRQHandler,Dummy_Handler - - .weak UART1_IRQHandler - .thumb_set UART1_IRQHandler,Dummy_Handler - - .weak UART2_IRQHandler - .thumb_set UART2_IRQHandler,Dummy_Handler - - .weak UART3_IRQHandler - .thumb_set UART3_IRQHandler,Dummy_Handler - - .weak PWM1_IRQHandler - .thumb_set PWM1_IRQHandler,Dummy_Handler - - .weak I2C0_IRQHandler - .thumb_set I2C0_IRQHandler,Dummy_Handler - - .weak I2C1_IRQHandler - .thumb_set I2C1_IRQHandler,Dummy_Handler - - .weak I2C2_IRQHandler - .thumb_set I2C2_IRQHandler,Dummy_Handler - - .weak SPI_IRQHandler - .thumb_set SPI_IRQHandler,Dummy_Handler - - .weak SSP0_IRQHandler - .thumb_set SSP0_IRQHandler,Dummy_Handler - - .weak SSP1_IRQHandler - .thumb_set SSP1_IRQHandler,Dummy_Handler - - .weak PLL0_IRQHandler - .thumb_set PLL0_IRQHandler,Dummy_Handler - - .weak RTC_IRQHandler - .thumb_set RTC_IRQHandler,Dummy_Handler - - .weak EINT0_IRQHandler - .thumb_set EINT0_IRQHandler,Dummy_Handler - - .weak EINT1_IRQHandler - .thumb_set EINT1_IRQHandler,Dummy_Handler - - .weak EINT2_IRQHandler - .thumb_set EINT2_IRQHandler,Dummy_Handler - - .weak EINT3_IRQHandler - .thumb_set EINT3_IRQHandler,Dummy_Handler - - .weak ADC_IRQHandler - .thumb_set ADC_IRQHandler,Dummy_Handler - - .weak BOD_IRQHandler - .thumb_set BOD_IRQHandler,Dummy_Handler - - .weak USB_IRQHandler - .thumb_set USB_IRQHandler,Dummy_Handler - - .weak CAN_IRQHandler - .thumb_set CAN_IRQHandler,Dummy_Handler - - .weak DMA_IRQHandler - .thumb_set DMA_IRQHandler,Dummy_Handler - - .weak I2S_IRQHandler - .thumb_set I2S_IRQHandler,Dummy_Handler - - .weak ENET_IRQHandler - .thumb_set ENET_IRQHandler,Dummy_Handler - - .weak RIT_IRQHandler - .thumb_set RIT_IRQHandler,Dummy_Handler - - .weak MCPWM_IRQHandler - .thumb_set MCPWM_IRQHandler,Dummy_Handler - - .weak QEI_IRQHandler - .thumb_set QEI_IRQHandler,Dummy_Handler - - .weak PLL1_IRQHandler - .thumb_set PLL1_IRQHandler,Dummy_Handler - - .weak USBActivity_IRQHandler - .thumb_set USBActivity_IRQHandler,Dummy_Handler - - .weak CANActivity_IRQHandler - .thumb_set CANActivity_IRQHandler,Dummy_Handler - -#else - - .thumb_func - .weak WDT_IRQHandler -WDT_IRQHandler: - b . - - .thumb_func - .weak TIMER0_IRQHandler -TIMER0_IRQHandler: - b . - - .thumb_func - .weak TIMER1_IRQHandler -TIMER1_IRQHandler: - b . - - .thumb_func - .weak TIMER2_IRQHandler -TIMER2_IRQHandler: - b . - - .thumb_func - .weak TIMER3_IRQHandler -TIMER3_IRQHandler: - b . - - .thumb_func - .weak UART0_IRQHandler -UART0_IRQHandler: - b . - - .thumb_func - .weak UART1_IRQHandler -UART1_IRQHandler: - b . - - .thumb_func - .weak UART2_IRQHandler -UART2_IRQHandler: - b . - - .thumb_func - .weak UART3_IRQHandler -UART3_IRQHandler: - b . - - .thumb_func - .weak PWM1_IRQHandler -PWM1_IRQHandler: - b . - - .thumb_func - .weak I2C0_IRQHandler -I2C0_IRQHandler: - b . - - .thumb_func - .weak I2C1_IRQHandler -I2C1_IRQHandler: - b . - - .thumb_func - .weak I2C2_IRQHandler -I2C2_IRQHandler: - b . - - .thumb_func - .weak SPI_IRQHandler -SPI_IRQHandler: - b . - - .thumb_func - .weak SSP0_IRQHandler -SSP0_IRQHandler: - b . - - .thumb_func - .weak SSP1_IRQHandler -SSP1_IRQHandler: - b . - - .thumb_func - .weak PLL0_IRQHandler -PLL0_IRQHandler: - b . - - .thumb_func - .weak RTC_IRQHandler -RTC_IRQHandler: - b . - - .thumb_func - .weak EINT0_IRQHandler -EINT0_IRQHandler: - b . - - .thumb_func - .weak EINT1_IRQHandler -EINT1_IRQHandler: - b . - - .thumb_func - .weak EINT2_IRQHandler -EINT2_IRQHandler: - b . - - .thumb_func - .weak EINT3_IRQHandler -EINT3_IRQHandler: - b . - - .thumb_func - .weak ADC_IRQHandler -ADC_IRQHandler: - b . - - .thumb_func - .weak BOD_IRQHandler -BOD_IRQHandler: - b . - - .thumb_func - .weak USB_IRQHandler -USB_IRQHandler: - b . - - .thumb_func - .weak CAN_IRQHandler -CAN_IRQHandler: - b . - - .thumb_func - .weak DMA_IRQHandler -DMA_IRQHandler: - b . - - .thumb_func - .weak I2S_IRQHandler -I2S_IRQHandler: - b . - - .thumb_func - .weak ENET_IRQHandler -ENET_IRQHandler: - b . - - .thumb_func - .weak RIT_IRQHandler -RIT_IRQHandler: - b . - - .thumb_func - .weak MCPWM_IRQHandler -MCPWM_IRQHandler: - b . - - .thumb_func - .weak QEI_IRQHandler -QEI_IRQHandler: - b . - - .thumb_func - .weak PLL1_IRQHandler -PLL1_IRQHandler: - b . - - .thumb_func - .weak USBActivity_IRQHandler -USBActivity_IRQHandler: - b . - - .thumb_func - .weak CANActivity_IRQHandler -CANActivity_IRQHandler: - b . - -#endif - -/***************************************************************************** - * Vector Table * - *****************************************************************************/ - - .section .vectors, "ax" - .align 0 - .global _vectors - .extern __stack_end__ - .extern Reset_Handler - -_vectors: - .word __stack_end__ - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word SVC_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word PendSV_Handler - .word SysTick_Handler - .word WDT_IRQHandler - .word TIMER0_IRQHandler - .word TIMER1_IRQHandler - .word TIMER2_IRQHandler - .word TIMER3_IRQHandler - .word UART0_IRQHandler - .word UART1_IRQHandler - .word UART2_IRQHandler - .word UART3_IRQHandler - .word PWM1_IRQHandler - .word I2C0_IRQHandler - .word I2C1_IRQHandler - .word I2C2_IRQHandler - .word SPI_IRQHandler - .word SSP0_IRQHandler - .word SSP1_IRQHandler - .word PLL0_IRQHandler - .word RTC_IRQHandler - .word EINT0_IRQHandler - .word EINT1_IRQHandler - .word EINT2_IRQHandler - .word EINT3_IRQHandler - .word ADC_IRQHandler - .word BOD_IRQHandler - .word USB_IRQHandler - .word CAN_IRQHandler - .word DMA_IRQHandler - .word I2S_IRQHandler - .word ENET_IRQHandler - .word RIT_IRQHandler - .word MCPWM_IRQHandler - .word QEI_IRQHandler - .word PLL1_IRQHandler - .word USBActivity_IRQHandler - .word CANActivity_IRQHandler -_vectors_end: - -#ifdef VECTORS_IN_RAM - .section .vectors_ram, "ax" - .align 0 - .global _vectors_ram - -_vectors_ram: - .space _vectors_end - _vectors, 0 -#endif diff --git a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/flash_placement.xml b/examples/device/cdc_msc_freertos/ses/lpc175x_6x/flash_placement.xml deleted file mode 100644 index 79bedc53..00000000 --- a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/flash_placement.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/lpc175x_6x.emProject b/examples/device/cdc_msc_freertos/ses/lpc175x_6x/lpc175x_6x.emProject deleted file mode 100644 index 691f8c3b..00000000 --- a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/lpc175x_6x.emProject +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/thumb_crt0.s b/examples/device/cdc_msc_freertos/ses/lpc175x_6x/thumb_crt0.s deleted file mode 100644 index 17f88e0c..00000000 --- a/examples/device/cdc_msc_freertos/ses/lpc175x_6x/thumb_crt0.s +++ /dev/null @@ -1,415 +0,0 @@ -// ********************************************************************** -// * SEGGER Microcontroller GmbH * -// * The Embedded Experts * -// ********************************************************************** -// * * -// * (c) 2014 - 2018 SEGGER Microcontroller GmbH * -// * (c) 2001 - 2018 Rowley Associates Limited * -// * * -// * www.segger.com Support: support@segger.com * -// * * -// ********************************************************************** -// * * -// * All rights reserved. * -// * * -// * Redistribution and use in source and binary forms, with or * -// * without modification, are permitted provided that the following * -// * conditions are met: * -// * * -// * - Redistributions of source code must retain the above copyright * -// * notice, this list of conditions and the following disclaimer. * -// * * -// * - Neither the name of SEGGER Microcontroller GmbH * -// * nor the names of its contributors may be used to endorse or * -// * promote products derived from this software without specific * -// * prior written permission. * -// * * -// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -// * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -// * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -// * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -// * DISCLAIMED. * -// * IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -// * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -// * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -// * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -// * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -// * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -// * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -// * DAMAGE. * -// * * -// ********************************************************************** -// -// -// Preprocessor Definitions -// ------------------------ -// APP_ENTRY_POINT -// -// Defines the application entry point function, if undefined this setting -// defaults to "main". -// -// INITIALIZE_STACK -// -// If defined, the contents of the stack will be initialized to a the -// value 0xCC. -// -// INITIALIZE_SECONDARY_SECTIONS -// -// If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized. -// -// INITIALIZE_TCM_SECTIONS -// -// If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections -// will be initialized. -// -// INITIALIZE_USER_SECTIONS -// -// If defined, the function InitializeUserMemorySections will be called prior -// to entering main in order to allow the user to initialize any user defined -// memory sections. -// -// FULL_LIBRARY -// -// If defined then -// - argc, argv are setup by the debug_getargs. -// - the exit symbol is defined and executes on return from main. -// - the exit symbol calls destructors, atexit functions and then debug_exit. -// -// If not defined then -// - argc and argv are zero. -// - the exit symbol is defined, executes on return from main and loops -// - -#ifndef APP_ENTRY_POINT -#define APP_ENTRY_POINT main -#endif - -#ifndef ARGSSPACE -#define ARGSSPACE 128 -#endif - .syntax unified - - .global _start - .extern APP_ENTRY_POINT - .global exit - .weak exit - -#ifdef INITIALIZE_USER_SECTIONS - .extern InitializeUserMemorySections -#endif - - .section .init, "ax" - .code 16 - .balign 2 - .thumb_func - -_start: - /* Set up main stack if size > 0 */ - ldr r1, =__stack_end__ - ldr r0, =__stack_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - mov sp, r1 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - ldr r0, =__stack_start__ - bl memory_set -#endif -1: - - /* Set up process stack if size > 0 */ - ldr r1, =__stack_process_end__ - ldr r0, =__stack_process_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - msr psp, r1 - movs r2, #2 - msr control, r2 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - bl memory_set -#endif -1: - - /* Copy initialized memory sections into RAM (if necessary). */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl memory_copy - ldr r0, =__tdata_load_start__ - ldr r1, =__tdata_start__ - ldr r2, =__tdata_end__ - bl memory_copy -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__data2_load_start__ - ldr r1, =__data2_start__ - ldr r2, =__data2_end__ - bl memory_copy - ldr r0, =__text2_load_start__ - ldr r1, =__text2_start__ - ldr r2, =__text2_end__ - bl memory_copy - ldr r0, =__rodata2_load_start__ - ldr r1, =__rodata2_start__ - ldr r2, =__rodata2_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__data_tcm_load_start__ - ldr r1, =__data_tcm_start__ - ldr r2, =__data_tcm_end__ - bl memory_copy - ldr r0, =__text_tcm_load_start__ - ldr r1, =__text_tcm_start__ - ldr r2, =__text_tcm_end__ - bl memory_copy - ldr r0, =__rodata_tcm_load_start__ - ldr r1, =__rodata_tcm_start__ - ldr r2, =__rodata_tcm_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Zero the bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - movs r2, #0 - bl memory_set - ldr r0, =__tbss_start__ - ldr r1, =__tbss_end__ - movs r2, #0 - bl memory_set -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__bss2_start__ - ldr r1, =__bss2_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__bss_tcm_start__ - ldr r1, =__bss_tcm_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Initialize the heap */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - subs r1, r1, r0 - cmp r1, #8 - blt 1f - movs r2, #0 - str r2, [r0] - adds r0, r0, #4 - str r1, [r0] -1: - -#ifdef INITIALIZE_USER_SECTIONS - ldr r2, =InitializeUserMemorySections - blx r2 -#endif - - /* Call constructors */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -ctor_loop: - cmp r0, r1 - beq ctor_end - ldr r2, [r0] - adds r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b ctor_loop -ctor_end: - - /* Setup initial call frame */ - movs r0, #0 - mov lr, r0 - mov r12, sp - - .type start, function -start: - /* Jump to application entry point */ -#ifdef FULL_LIBRARY - movs r0, #ARGSSPACE - ldr r1, =args - ldr r2, =debug_getargs - blx r2 - ldr r1, =args -#else - movs r0, #0 - movs r1, #0 -#endif - ldr r2, =APP_ENTRY_POINT - blx r2 - - .thumb_func -exit: -#ifdef FULL_LIBRARY - mov r5, r0 // save the exit parameter/return result - - /* Call destructors */ - ldr r0, =__dtors_start__ - ldr r1, =__dtors_end__ -dtor_loop: - cmp r0, r1 - beq dtor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b dtor_loop -dtor_end: - - /* Call atexit functions */ - ldr r2, =_execute_at_exit_fns - blx r2 - - /* Call debug_exit with return result/exit parameter */ - mov r0, r5 - ldr r2, =debug_exit - blx r2 -#endif - - /* Returned from application entry point, loop forever. */ -exit_loop: - b exit_loop - - .thumb_func -memory_copy: - cmp r0, r1 - beq 2f - subs r2, r2, r1 - beq 2f -1: - ldrb r3, [r0] - adds r0, r0, #1 - strb r3, [r1] - adds r1, r1, #1 - subs r2, r2, #1 - bne 1b -2: - bx lr - - .thumb_func -memory_set: - cmp r0, r1 - beq 1f - strb r2, [r0] - adds r0, r0, #1 - b memory_set -1: - bx lr - - // default C/C++ library helpers - -.macro HELPER helper_name - .section .text.\helper_name, "ax", %progbits - .balign 2 - .global \helper_name - .weak \helper_name -\helper_name: - .thumb_func -.endm - -.macro JUMPTO name -#if defined(__thumb__) && !defined(__thumb2__) - mov r12, r0 - ldr r0, =\name - push {r0} - mov r0, r12 - pop {pc} -#else - b \name -#endif -.endm - -HELPER __aeabi_read_tp - ldr r0, =__tbss_start__-8 - bx lr -HELPER abort - b . -HELPER __assert - b . -HELPER __aeabi_assert - b . -HELPER __sync_synchronize - bx lr -HELPER __getchar - JUMPTO debug_getchar -HELPER __putchar - JUMPTO debug_putchar -HELPER __open - JUMPTO debug_fopen -HELPER __close - JUMPTO debug_fclose -HELPER __write - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fwrite -HELPER __read - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fread -HELPER __seek - push {r4, lr} - mov r4, r0 - bl debug_fseek - cmp r0, #0 - bne 1f - mov r0, r4 - bl debug_ftell - pop {r4, pc} -1: - ldr r0, =-1 - pop {r4, pc} - // char __user_locale_name_buffer[]; - .section .bss.__user_locale_name_buffer, "aw", %nobits - .global __user_locale_name_buffer - .weak __user_locale_name_buffer - __user_locale_name_buffer: - .word 0x0 - -#ifdef FULL_LIBRARY - .bss -args: - .space ARGSSPACE -#endif - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - diff --git a/examples/device/cdc_msc_freertos/ses/nrf5x/flash_placement.xml b/examples/device/cdc_msc_freertos/ses/nrf5x/flash_placement.xml deleted file mode 100644 index 951d2371..00000000 --- a/examples/device/cdc_msc_freertos/ses/nrf5x/flash_placement.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc_freertos/ses/nrf5x/nRF52840_xxAA_MemoryMap.xml b/examples/device/cdc_msc_freertos/ses/nrf5x/nRF52840_xxAA_MemoryMap.xml deleted file mode 100644 index cc4056c0..00000000 --- a/examples/device/cdc_msc_freertos/ses/nrf5x/nRF52840_xxAA_MemoryMap.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/examples/device/cdc_msc_freertos/ses/nrf5x/nRF_Target.js b/examples/device/cdc_msc_freertos/ses/nrf5x/nRF_Target.js deleted file mode 100644 index 20560af4..00000000 --- a/examples/device/cdc_msc_freertos/ses/nrf5x/nRF_Target.js +++ /dev/null @@ -1,19 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -function Reset() { - TargetInterface.resetAndStop(); -} - -function EnableTrace(traceInterfaceType) { - // TODO: Enable trace -} - diff --git a/examples/device/cdc_msc_freertos/ses/nrf5x/nrf52840_Registers.xml b/examples/device/cdc_msc_freertos/ses/nrf5x/nrf52840_Registers.xml deleted file mode 100644 index 39f861f9..00000000 --- a/examples/device/cdc_msc_freertos/ses/nrf5x/nrf52840_Registers.xml +++ /dev/null @@ -1,22310 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc_freertos/ses/nrf5x/nrf5x.emProject b/examples/device/cdc_msc_freertos/ses/nrf5x/nrf5x.emProject deleted file mode 100644 index e964d6fb..00000000 --- a/examples/device/cdc_msc_freertos/ses/nrf5x/nrf5x.emProject +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc_freertos/ses/nrf5x/thumb_crt0.s b/examples/device/cdc_msc_freertos/ses/nrf5x/thumb_crt0.s deleted file mode 100644 index 71820cb5..00000000 --- a/examples/device/cdc_msc_freertos/ses/nrf5x/thumb_crt0.s +++ /dev/null @@ -1,420 +0,0 @@ -// SEGGER Embedded Studio, runtime support. -// -// Copyright (c) 2014-2017 SEGGER Microcontroller GmbH & Co KG -// Copyright (c) 2001-2017 Rowley Associates Limited. -// -// This file may be distributed under the terms of the License Agreement -// provided with this software. -// -// THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// -// Preprocessor Definitions -// ------------------------ -// APP_ENTRY_POINT -// -// Defines the application entry point function, if undefined this setting -// defaults to "main". -// -// INITIALIZE_STACK -// -// If defined, the contents of the stack will be initialized to a the -// value 0xCC. -// -// INITIALIZE_SECONDARY_SECTIONS -// -// If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized. -// -// INITIALIZE_TCM_SECTIONS -// -// If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections -// will be initialized. -// -// INITIALIZE_USER_SECTIONS -// -// If defined, the function InitializeUserMemorySections will be called prior -// to entering main in order to allow the user to initialize any user defined -// memory sections. -// -// FULL_LIBRARY -// -// If defined then -// - argc, argv are setup by the debug_getargs. -// - the exit symbol is defined and executes on return from main. -// - the exit symbol calls destructors, atexit functions and then debug_exit. -// -// If not defined then -// - argc and argv are zero. -// - the exit symbol is defined, executes on return from main and loops -// - -#ifndef APP_ENTRY_POINT -#define APP_ENTRY_POINT main -#endif - -#ifndef ARGSSPACE -#define ARGSSPACE 128 -#endif - .syntax unified - - .global _start - .extern APP_ENTRY_POINT - .global exit - .weak exit - -#ifdef INITIALIZE_USER_SECTIONS - .extern InitializeUserMemorySections -#endif - - .section .init, "ax" - .code 16 - .align 2 - .thumb_func - -_start: - /* Set up main stack if size > 0 */ - ldr r1, =__stack_end__ - ldr r0, =__stack_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - mov sp, r1 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - ldr r0, =__stack_start__ - bl memory_set -#endif -1: - - /* Set up process stack if size > 0 */ - ldr r1, =__stack_process_end__ - ldr r0, =__stack_process_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - msr psp, r1 - movs r2, #2 - msr control, r2 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - bl memory_set -#endif -1: - - /* Copy initialized memory sections into RAM (if necessary). */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl memory_copy - ldr r0, =__tdata_load_start__ - ldr r1, =__tdata_start__ - ldr r2, =__tdata_end__ - bl memory_copy -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__data2_load_start__ - ldr r1, =__data2_start__ - ldr r2, =__data2_end__ - bl memory_copy - ldr r0, =__text2_load_start__ - ldr r1, =__text2_start__ - ldr r2, =__text2_end__ - bl memory_copy - ldr r0, =__rodata2_load_start__ - ldr r1, =__rodata2_start__ - ldr r2, =__rodata2_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__data_tcm_load_start__ - ldr r1, =__data_tcm_start__ - ldr r2, =__data_tcm_end__ - bl memory_copy - ldr r0, =__text_tcm_load_start__ - ldr r1, =__text_tcm_start__ - ldr r2, =__text_tcm_end__ - bl memory_copy - ldr r0, =__rodata_tcm_load_start__ - ldr r1, =__rodata_tcm_start__ - ldr r2, =__rodata_tcm_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Zero the bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - movs r2, #0 - bl memory_set - ldr r0, =__tbss_start__ - ldr r1, =__tbss_end__ - movs r2, #0 - bl memory_set -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__bss2_start__ - ldr r1, =__bss2_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__bss_tcm_start__ - ldr r1, =__bss_tcm_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Initialize the heap */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - subs r1, r1, r0 - cmp r1, #8 - blt 1f - movs r2, #0 - str r2, [r0] - adds r0, r0, #4 - str r1, [r0] -1: - -#ifdef INITIALIZE_USER_SECTIONS - ldr r2, =InitializeUserMemorySections - blx r2 -#endif - - /* Call constructors */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -ctor_loop: - cmp r0, r1 - beq ctor_end - ldr r2, [r0] - adds r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b ctor_loop -ctor_end: - - /* Setup initial call frame */ - movs r0, #0 - mov lr, r0 - mov r12, sp - - .type start, function -start: - /* Jump to application entry point */ -#ifdef FULL_LIBRARY - movs r0, #ARGSSPACE - ldr r1, =args - ldr r2, =debug_getargs - blx r2 - ldr r1, =args -#else - movs r0, #0 - movs r1, #0 -#endif - ldr r2, =APP_ENTRY_POINT - blx r2 - - .thumb_func -exit: -#ifdef FULL_LIBRARY - mov r5, r0 // save the exit parameter/return result - - /* Call destructors */ - ldr r0, =__dtors_start__ - ldr r1, =__dtors_end__ -dtor_loop: - cmp r0, r1 - beq dtor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b dtor_loop -dtor_end: - - /* Call atexit functions */ - ldr r2, =_execute_at_exit_fns - blx r2 - - /* Call debug_exit with return result/exit parameter */ - mov r0, r5 - ldr r2, =debug_exit - blx r2 -#endif - - /* Returned from application entry point, loop forever. */ -exit_loop: - b exit_loop - - .thumb_func -memory_copy: - cmp r0, r1 - beq 2f - subs r2, r2, r1 - beq 2f -1: - ldrb r3, [r0] - adds r0, r0, #1 - strb r3, [r1] - adds r1, r1, #1 - subs r2, r2, #1 - bne 1b -2: - bx lr - - .thumb_func -memory_set: - cmp r0, r1 - beq 1f - strb r2, [r0] - adds r0, r0, #1 - b memory_set -1: - bx lr - - // default C/C++ library helpers - -.macro HELPER helper_name - .section .text.\helper_name, "ax", %progbits - .global \helper_name - .weak \helper_name -\helper_name: - .thumb_func -.endm - -.macro JUMPTO name -#if defined(__thumb__) && !defined(__thumb2__) - mov r12, r0 - ldr r0, =\name - push {r0} - mov r0, r12 - pop {pc} -#else - b \name -#endif -.endm - -HELPER __aeabi_read_tp - ldr r0, =__tbss_start__-8 - bx lr -HELPER __heap_lock - bx lr -HELPER __heap_unlock - bx lr -HELPER __printf_lock - bx lr -HELPER __printf_unlock - bx lr -HELPER __scanf_lock - bx lr -HELPER __scanf_unlock - bx lr -HELPER __debug_io_lock - bx lr -HELPER __debug_io_unlock - bx lr -HELPER abort - b . -HELPER __assert - b . -HELPER __aeabi_assert - b . -HELPER __cxa_pure_virtual - b . -HELPER __cxa_guard_acquire - ldr r3, [r0] -#if defined(__thumb__) && !defined(__thumb2__) - movs r0, #1 - tst r3, r0 -#else - tst r3, #1 -#endif - beq 1f - movs r0, #0 - bx lr -1: - movs r0, #1 - bx lr -HELPER __cxa_guard_release - movs r3, #1 - str r3, [r0] - bx lr -HELPER __cxa_guard_abort - bx lr -HELPER __sync_synchronize - bx lr -HELPER __getchar - JUMPTO debug_getchar -HELPER __putchar - JUMPTO debug_putchar -HELPER __open - JUMPTO debug_fopen -HELPER __close - JUMPTO debug_fclose -HELPER __write - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fwrite -HELPER __read - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fread -HELPER __seek - push {r4, lr} - mov r4, r0 - bl debug_fseek - cmp r0, #0 - bne 1f - mov r0, r4 - bl debug_ftell - pop {r4, pc} -1: - ldr r0, =-1 - pop {r4, pc} - // char __user_locale_name_buffer[]; - .section .bss.__user_locale_name_buffer, "aw", %nobits - .global __user_locale_name_buffer - .weak __user_locale_name_buffer - __user_locale_name_buffer: - .word 0x0 - -#ifdef FULL_LIBRARY - .bss -args: - .space ARGSSPACE -#endif - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - diff --git a/examples/device/cdc_msc_freertos/ses/samd21/ATSAMD21G18A_MemoryMap.xml b/examples/device/cdc_msc_freertos/ses/samd21/ATSAMD21G18A_MemoryMap.xml deleted file mode 100644 index 2143d305..00000000 --- a/examples/device/cdc_msc_freertos/ses/samd21/ATSAMD21G18A_MemoryMap.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/examples/device/cdc_msc_freertos/ses/samd21/ATSAMD21G18A_Registers.xml b/examples/device/cdc_msc_freertos/ses/samd21/ATSAMD21G18A_Registers.xml deleted file mode 100644 index 2e0fa061..00000000 --- a/examples/device/cdc_msc_freertos/ses/samd21/ATSAMD21G18A_Registers.xml +++ /dev/null @@ -1,9587 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc_freertos/ses/samd21/ATSAMD21G18A_Vectors.s b/examples/device/cdc_msc_freertos/ses/samd21/ATSAMD21G18A_Vectors.s deleted file mode 100644 index 5cecbd23..00000000 --- a/examples/device/cdc_msc_freertos/ses/samd21/ATSAMD21G18A_Vectors.s +++ /dev/null @@ -1,331 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * VECTORS_IN_RAM * - * * - * If defined, an area of RAM will large enough to store the vector table * - * will be reserved. * - * * - *****************************************************************************/ - - .syntax unified - .code 16 - - .section .init, "ax" - .align 0 - -/***************************************************************************** - * Default Exception Handlers * - *****************************************************************************/ - - .thumb_func - .weak NMI_Handler -NMI_Handler: - b . - - .thumb_func - .weak HardFault_Handler -HardFault_Handler: - b . - - .thumb_func - .weak SVC_Handler -SVC_Handler: - b . - - .thumb_func - .weak PendSV_Handler -PendSV_Handler: - b . - - .thumb_func - .weak SysTick_Handler -SysTick_Handler: - b . - - .thumb_func -Dummy_Handler: - b . - -#if defined(__OPTIMIZATION_SMALL) - - .weak PM_Handler - .thumb_set PM_Handler,Dummy_Handler - - .weak SYSCTRL_Handler - .thumb_set SYSCTRL_Handler,Dummy_Handler - - .weak WDT_Handler - .thumb_set WDT_Handler,Dummy_Handler - - .weak RTC_Handler - .thumb_set RTC_Handler,Dummy_Handler - - .weak EIC_Handler - .thumb_set EIC_Handler,Dummy_Handler - - .weak NVMCTRL_Handler - .thumb_set NVMCTRL_Handler,Dummy_Handler - - .weak DMAC_Handler - .thumb_set DMAC_Handler,Dummy_Handler - - .weak USB_Handler - .thumb_set USB_Handler,Dummy_Handler - - .weak EVSYS_Handler - .thumb_set EVSYS_Handler,Dummy_Handler - - .weak SERCOM0_Handler - .thumb_set SERCOM0_Handler,Dummy_Handler - - .weak SERCOM1_Handler - .thumb_set SERCOM1_Handler,Dummy_Handler - - .weak SERCOM2_Handler - .thumb_set SERCOM2_Handler,Dummy_Handler - - .weak SERCOM3_Handler - .thumb_set SERCOM3_Handler,Dummy_Handler - - .weak SERCOM4_Handler - .thumb_set SERCOM4_Handler,Dummy_Handler - - .weak SERCOM5_Handler - .thumb_set SERCOM5_Handler,Dummy_Handler - - .weak TCC0_Handler - .thumb_set TCC0_Handler,Dummy_Handler - - .weak TCC1_Handler - .thumb_set TCC1_Handler,Dummy_Handler - - .weak TCC2_Handler - .thumb_set TCC2_Handler,Dummy_Handler - - .weak TC3_Handler - .thumb_set TC3_Handler,Dummy_Handler - - .weak TC4_Handler - .thumb_set TC4_Handler,Dummy_Handler - - .weak TC5_Handler - .thumb_set TC5_Handler,Dummy_Handler - - .weak ADC_Handler - .thumb_set ADC_Handler,Dummy_Handler - - .weak AC_Handler - .thumb_set AC_Handler,Dummy_Handler - - .weak DAC_Handler - .thumb_set DAC_Handler,Dummy_Handler - - .weak I2S_Handler - .thumb_set I2S_Handler,Dummy_Handler - -#else - - .thumb_func - .weak PM_Handler -PM_Handler: - b . - - .thumb_func - .weak SYSCTRL_Handler -SYSCTRL_Handler: - b . - - .thumb_func - .weak WDT_Handler -WDT_Handler: - b . - - .thumb_func - .weak RTC_Handler -RTC_Handler: - b . - - .thumb_func - .weak EIC_Handler -EIC_Handler: - b . - - .thumb_func - .weak NVMCTRL_Handler -NVMCTRL_Handler: - b . - - .thumb_func - .weak DMAC_Handler -DMAC_Handler: - b . - - .thumb_func - .weak USB_Handler -USB_Handler: - b . - - .thumb_func - .weak EVSYS_Handler -EVSYS_Handler: - b . - - .thumb_func - .weak SERCOM0_Handler -SERCOM0_Handler: - b . - - .thumb_func - .weak SERCOM1_Handler -SERCOM1_Handler: - b . - - .thumb_func - .weak SERCOM2_Handler -SERCOM2_Handler: - b . - - .thumb_func - .weak SERCOM3_Handler -SERCOM3_Handler: - b . - - .thumb_func - .weak SERCOM4_Handler -SERCOM4_Handler: - b . - - .thumb_func - .weak SERCOM5_Handler -SERCOM5_Handler: - b . - - .thumb_func - .weak TCC0_Handler -TCC0_Handler: - b . - - .thumb_func - .weak TCC1_Handler -TCC1_Handler: - b . - - .thumb_func - .weak TCC2_Handler -TCC2_Handler: - b . - - .thumb_func - .weak TC3_Handler -TC3_Handler: - b . - - .thumb_func - .weak TC4_Handler -TC4_Handler: - b . - - .thumb_func - .weak TC5_Handler -TC5_Handler: - b . - - .thumb_func - .weak ADC_Handler -ADC_Handler: - b . - - .thumb_func - .weak AC_Handler -AC_Handler: - b . - - .thumb_func - .weak DAC_Handler -DAC_Handler: - b . - - .thumb_func - .weak I2S_Handler -I2S_Handler: - b . - -#endif - -/***************************************************************************** - * Vector Table * - *****************************************************************************/ - - .section .vectors, "ax" - .align 0 - .global _vectors - .extern __stack_end__ - .extern Reset_Handler - -_vectors: - .word __stack_end__ - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word SVC_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word PendSV_Handler - .word SysTick_Handler - .word PM_Handler - .word SYSCTRL_Handler - .word WDT_Handler - .word RTC_Handler - .word EIC_Handler - .word NVMCTRL_Handler - .word DMAC_Handler - .word USB_Handler - .word EVSYS_Handler - .word SERCOM0_Handler - .word SERCOM1_Handler - .word SERCOM2_Handler - .word SERCOM3_Handler - .word SERCOM4_Handler - .word SERCOM5_Handler - .word TCC0_Handler - .word TCC1_Handler - .word TCC2_Handler - .word TC3_Handler - .word TC4_Handler - .word TC5_Handler - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word ADC_Handler - .word AC_Handler - .word DAC_Handler - .word Dummy_Handler /* Reserved */ - .word I2S_Handler -_vectors_end: - -#ifdef VECTORS_IN_RAM - .section .vectors_ram, "ax" - .align 0 - .global _vectors_ram - -_vectors_ram: - .space _vectors_end - _vectors, 0 -#endif diff --git a/examples/device/cdc_msc_freertos/ses/samd21/SAMD21_Startup.s b/examples/device/cdc_msc_freertos/ses/samd21/SAMD21_Startup.s deleted file mode 100644 index c4b48d35..00000000 --- a/examples/device/cdc_msc_freertos/ses/samd21/SAMD21_Startup.s +++ /dev/null @@ -1,114 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * NO_STACK_INIT * - * * - * If defined, the stack pointer will not be initialised. * - * * - * NO_SYSTEM_INIT * - * * - * If defined, the SystemInit() function will not be called. By default * - * SystemInit() is called after reset to enable the clocks and memories to * - * be initialised prior to any C startup initialisation. * - * * - * NO_VTOR_CONFIG * - * * - * If defined, the vector table offset register will not be configured. * - * * - * MEMORY_INIT * - * * - * If defined, the MemoryInit() function will be called. By default * - * MemoryInit() is called after SystemInit() to enable an external memory * - * controller. * - * * - * STACK_INIT_VAL * - * * - * If defined, specifies the initial stack pointer value. If undefined, * - * the stack pointer will be initialised to point to the end of the * - * RAM segment. * - * * - * VECTORS_IN_RAM * - * * - * If defined, the exception vectors will be copied from Flash to RAM. * - * * - *****************************************************************************/ - - .syntax unified - - .global Reset_Handler - .extern _vectors - - .section .init, "ax" - .thumb_func - - .equ VTOR_REG, 0xE000ED08 - -#ifndef STACK_INIT_VAL -#define STACK_INIT_VAL __RAM_segment_end__ -#endif - -Reset_Handler: -#ifndef NO_STACK_INIT - /* Initialise main stack */ - ldr r0, =STACK_INIT_VAL - ldr r1, =0x7 - bics r0, r1 - mov sp, r0 -#endif - -#ifndef NO_SYSTEM_INIT - /* Initialise system */ - ldr r0, =SystemInit - blx r0 - .pushsection .init_array, "aw", %init_array - .word SystemCoreClockUpdate - .popsection -#endif - -#ifdef MEMORY_INIT - ldr r0, =MemoryInit - blx r0 -#endif - -#ifdef VECTORS_IN_RAM - /* Copy exception vectors into RAM */ - ldr r0, =__vectors_start__ - ldr r1, =__vectors_end__ - ldr r2, =__vectors_ram_start__ -1: - cmp r0, r1 - beq 2f - ldr r3, [r0] - str r3, [r2] - adds r0, r0, #4 - adds r2, r2, #4 - b 1b -2: -#endif - -#ifndef NO_VTOR_CONFIG - /* Configure vector table offset register */ - ldr r0, =VTOR_REG -#ifdef VECTORS_IN_RAM - ldr r1, =_vectors_ram -#else - ldr r1, =_vectors -#endif - str r1, [r0] -#endif - - /* Jump to program start */ - b _start - - diff --git a/examples/device/cdc_msc_freertos/ses/samd21/SAMD21_Target.js b/examples/device/cdc_msc_freertos/ses/samd21/SAMD21_Target.js deleted file mode 100644 index 20560af4..00000000 --- a/examples/device/cdc_msc_freertos/ses/samd21/SAMD21_Target.js +++ /dev/null @@ -1,19 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -function Reset() { - TargetInterface.resetAndStop(); -} - -function EnableTrace(traceInterfaceType) { - // TODO: Enable trace -} - diff --git a/examples/device/cdc_msc_freertos/ses/samd21/flash_placement.xml b/examples/device/cdc_msc_freertos/ses/samd21/flash_placement.xml deleted file mode 100644 index 79bedc53..00000000 --- a/examples/device/cdc_msc_freertos/ses/samd21/flash_placement.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc_freertos/ses/samd21/samd21.emProject b/examples/device/cdc_msc_freertos/ses/samd21/samd21.emProject deleted file mode 100644 index b3db856d..00000000 --- a/examples/device/cdc_msc_freertos/ses/samd21/samd21.emProject +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc_freertos/ses/samd21/thumb_crt0.s b/examples/device/cdc_msc_freertos/ses/samd21/thumb_crt0.s deleted file mode 100644 index 17f88e0c..00000000 --- a/examples/device/cdc_msc_freertos/ses/samd21/thumb_crt0.s +++ /dev/null @@ -1,415 +0,0 @@ -// ********************************************************************** -// * SEGGER Microcontroller GmbH * -// * The Embedded Experts * -// ********************************************************************** -// * * -// * (c) 2014 - 2018 SEGGER Microcontroller GmbH * -// * (c) 2001 - 2018 Rowley Associates Limited * -// * * -// * www.segger.com Support: support@segger.com * -// * * -// ********************************************************************** -// * * -// * All rights reserved. * -// * * -// * Redistribution and use in source and binary forms, with or * -// * without modification, are permitted provided that the following * -// * conditions are met: * -// * * -// * - Redistributions of source code must retain the above copyright * -// * notice, this list of conditions and the following disclaimer. * -// * * -// * - Neither the name of SEGGER Microcontroller GmbH * -// * nor the names of its contributors may be used to endorse or * -// * promote products derived from this software without specific * -// * prior written permission. * -// * * -// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -// * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -// * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -// * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -// * DISCLAIMED. * -// * IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -// * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -// * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -// * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -// * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -// * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -// * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -// * DAMAGE. * -// * * -// ********************************************************************** -// -// -// Preprocessor Definitions -// ------------------------ -// APP_ENTRY_POINT -// -// Defines the application entry point function, if undefined this setting -// defaults to "main". -// -// INITIALIZE_STACK -// -// If defined, the contents of the stack will be initialized to a the -// value 0xCC. -// -// INITIALIZE_SECONDARY_SECTIONS -// -// If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized. -// -// INITIALIZE_TCM_SECTIONS -// -// If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections -// will be initialized. -// -// INITIALIZE_USER_SECTIONS -// -// If defined, the function InitializeUserMemorySections will be called prior -// to entering main in order to allow the user to initialize any user defined -// memory sections. -// -// FULL_LIBRARY -// -// If defined then -// - argc, argv are setup by the debug_getargs. -// - the exit symbol is defined and executes on return from main. -// - the exit symbol calls destructors, atexit functions and then debug_exit. -// -// If not defined then -// - argc and argv are zero. -// - the exit symbol is defined, executes on return from main and loops -// - -#ifndef APP_ENTRY_POINT -#define APP_ENTRY_POINT main -#endif - -#ifndef ARGSSPACE -#define ARGSSPACE 128 -#endif - .syntax unified - - .global _start - .extern APP_ENTRY_POINT - .global exit - .weak exit - -#ifdef INITIALIZE_USER_SECTIONS - .extern InitializeUserMemorySections -#endif - - .section .init, "ax" - .code 16 - .balign 2 - .thumb_func - -_start: - /* Set up main stack if size > 0 */ - ldr r1, =__stack_end__ - ldr r0, =__stack_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - mov sp, r1 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - ldr r0, =__stack_start__ - bl memory_set -#endif -1: - - /* Set up process stack if size > 0 */ - ldr r1, =__stack_process_end__ - ldr r0, =__stack_process_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - msr psp, r1 - movs r2, #2 - msr control, r2 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - bl memory_set -#endif -1: - - /* Copy initialized memory sections into RAM (if necessary). */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl memory_copy - ldr r0, =__tdata_load_start__ - ldr r1, =__tdata_start__ - ldr r2, =__tdata_end__ - bl memory_copy -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__data2_load_start__ - ldr r1, =__data2_start__ - ldr r2, =__data2_end__ - bl memory_copy - ldr r0, =__text2_load_start__ - ldr r1, =__text2_start__ - ldr r2, =__text2_end__ - bl memory_copy - ldr r0, =__rodata2_load_start__ - ldr r1, =__rodata2_start__ - ldr r2, =__rodata2_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__data_tcm_load_start__ - ldr r1, =__data_tcm_start__ - ldr r2, =__data_tcm_end__ - bl memory_copy - ldr r0, =__text_tcm_load_start__ - ldr r1, =__text_tcm_start__ - ldr r2, =__text_tcm_end__ - bl memory_copy - ldr r0, =__rodata_tcm_load_start__ - ldr r1, =__rodata_tcm_start__ - ldr r2, =__rodata_tcm_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Zero the bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - movs r2, #0 - bl memory_set - ldr r0, =__tbss_start__ - ldr r1, =__tbss_end__ - movs r2, #0 - bl memory_set -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__bss2_start__ - ldr r1, =__bss2_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__bss_tcm_start__ - ldr r1, =__bss_tcm_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Initialize the heap */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - subs r1, r1, r0 - cmp r1, #8 - blt 1f - movs r2, #0 - str r2, [r0] - adds r0, r0, #4 - str r1, [r0] -1: - -#ifdef INITIALIZE_USER_SECTIONS - ldr r2, =InitializeUserMemorySections - blx r2 -#endif - - /* Call constructors */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -ctor_loop: - cmp r0, r1 - beq ctor_end - ldr r2, [r0] - adds r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b ctor_loop -ctor_end: - - /* Setup initial call frame */ - movs r0, #0 - mov lr, r0 - mov r12, sp - - .type start, function -start: - /* Jump to application entry point */ -#ifdef FULL_LIBRARY - movs r0, #ARGSSPACE - ldr r1, =args - ldr r2, =debug_getargs - blx r2 - ldr r1, =args -#else - movs r0, #0 - movs r1, #0 -#endif - ldr r2, =APP_ENTRY_POINT - blx r2 - - .thumb_func -exit: -#ifdef FULL_LIBRARY - mov r5, r0 // save the exit parameter/return result - - /* Call destructors */ - ldr r0, =__dtors_start__ - ldr r1, =__dtors_end__ -dtor_loop: - cmp r0, r1 - beq dtor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b dtor_loop -dtor_end: - - /* Call atexit functions */ - ldr r2, =_execute_at_exit_fns - blx r2 - - /* Call debug_exit with return result/exit parameter */ - mov r0, r5 - ldr r2, =debug_exit - blx r2 -#endif - - /* Returned from application entry point, loop forever. */ -exit_loop: - b exit_loop - - .thumb_func -memory_copy: - cmp r0, r1 - beq 2f - subs r2, r2, r1 - beq 2f -1: - ldrb r3, [r0] - adds r0, r0, #1 - strb r3, [r1] - adds r1, r1, #1 - subs r2, r2, #1 - bne 1b -2: - bx lr - - .thumb_func -memory_set: - cmp r0, r1 - beq 1f - strb r2, [r0] - adds r0, r0, #1 - b memory_set -1: - bx lr - - // default C/C++ library helpers - -.macro HELPER helper_name - .section .text.\helper_name, "ax", %progbits - .balign 2 - .global \helper_name - .weak \helper_name -\helper_name: - .thumb_func -.endm - -.macro JUMPTO name -#if defined(__thumb__) && !defined(__thumb2__) - mov r12, r0 - ldr r0, =\name - push {r0} - mov r0, r12 - pop {pc} -#else - b \name -#endif -.endm - -HELPER __aeabi_read_tp - ldr r0, =__tbss_start__-8 - bx lr -HELPER abort - b . -HELPER __assert - b . -HELPER __aeabi_assert - b . -HELPER __sync_synchronize - bx lr -HELPER __getchar - JUMPTO debug_getchar -HELPER __putchar - JUMPTO debug_putchar -HELPER __open - JUMPTO debug_fopen -HELPER __close - JUMPTO debug_fclose -HELPER __write - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fwrite -HELPER __read - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fread -HELPER __seek - push {r4, lr} - mov r4, r0 - bl debug_fseek - cmp r0, #0 - bne 1f - mov r0, r4 - bl debug_ftell - pop {r4, pc} -1: - ldr r0, =-1 - pop {r4, pc} - // char __user_locale_name_buffer[]; - .section .bss.__user_locale_name_buffer, "aw", %nobits - .global __user_locale_name_buffer - .weak __user_locale_name_buffer - __user_locale_name_buffer: - .word 0x0 - -#ifdef FULL_LIBRARY - .bss -args: - .space ARGSSPACE -#endif - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - diff --git a/examples/device/cdc_msc_freertos/ses/samd51/ATSAMD51J19A_MemoryMap.xml b/examples/device/cdc_msc_freertos/ses/samd51/ATSAMD51J19A_MemoryMap.xml deleted file mode 100644 index 49d9a9cb..00000000 --- a/examples/device/cdc_msc_freertos/ses/samd51/ATSAMD51J19A_MemoryMap.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/examples/device/cdc_msc_freertos/ses/samd51/ATSAMD51J19A_Registers.xml b/examples/device/cdc_msc_freertos/ses/samd51/ATSAMD51J19A_Registers.xml deleted file mode 100644 index 83fe837f..00000000 --- a/examples/device/cdc_msc_freertos/ses/samd51/ATSAMD51J19A_Registers.xml +++ /dev/null @@ -1,23643 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc_freertos/ses/samd51/ATSAMD51J19A_Vectors.s b/examples/device/cdc_msc_freertos/ses/samd51/ATSAMD51J19A_Vectors.s deleted file mode 100644 index 6369de86..00000000 --- a/examples/device/cdc_msc_freertos/ses/samd51/ATSAMD51J19A_Vectors.s +++ /dev/null @@ -1,1227 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * STARTUP_FROM_RESET * - * * - * If defined, the program will startup from power-on/reset. If not * - * defined the program will just loop endlessly from power-on/reset. * - * * - * VECTORS_IN_RAM * - * * - * If defined, an area of RAM will large enough to store the vector table * - * will be reserved. * - * * - *****************************************************************************/ - - .syntax unified - .code 16 - - .section .init, "ax" - .align 0 - -/***************************************************************************** - * Default Exception Handlers * - *****************************************************************************/ - -#ifndef STARTUP_FROM_RESET - - .thumb_func - .weak Reset_Wait -Reset_Wait: - b . - -#endif - - .thumb_func - .weak NMI_Handler -NMI_Handler: - b . - - .thumb_func - .weak HardFault_Handler -HardFault_Handler: - b . - - .thumb_func - .weak SVC_Handler -SVC_Handler: - b . - - .thumb_func - .weak PendSV_Handler -PendSV_Handler: - b . - - .thumb_func - .weak SysTick_Handler -SysTick_Handler: - b . - - .thumb_func -Dummy_Handler: - b . - -#if defined(__OPTIMIZATION_SMALL) - - .weak PM_Handler - .thumb_set PM_Handler,Dummy_Handler - - .weak MCLK_Handler - .thumb_set MCLK_Handler,Dummy_Handler - - .weak OSCCTRL_0_Handler - .thumb_set OSCCTRL_0_Handler,Dummy_Handler - - .weak OSCCTRL_1_Handler - .thumb_set OSCCTRL_1_Handler,Dummy_Handler - - .weak OSCCTRL_2_Handler - .thumb_set OSCCTRL_2_Handler,Dummy_Handler - - .weak OSCCTRL_3_Handler - .thumb_set OSCCTRL_3_Handler,Dummy_Handler - - .weak OSCCTRL_4_Handler - .thumb_set OSCCTRL_4_Handler,Dummy_Handler - - .weak OSC32KCTRL_Handler - .thumb_set OSC32KCTRL_Handler,Dummy_Handler - - .weak SUPC_0_Handler - .thumb_set SUPC_0_Handler,Dummy_Handler - - .weak SUPC_1_Handler - .thumb_set SUPC_1_Handler,Dummy_Handler - - .weak WDT_Handler - .thumb_set WDT_Handler,Dummy_Handler - - .weak RTC_Handler - .thumb_set RTC_Handler,Dummy_Handler - - .weak EIC_0_Handler - .thumb_set EIC_0_Handler,Dummy_Handler - - .weak EIC_1_Handler - .thumb_set EIC_1_Handler,Dummy_Handler - - .weak EIC_2_Handler - .thumb_set EIC_2_Handler,Dummy_Handler - - .weak EIC_3_Handler - .thumb_set EIC_3_Handler,Dummy_Handler - - .weak EIC_4_Handler - .thumb_set EIC_4_Handler,Dummy_Handler - - .weak EIC_5_Handler - .thumb_set EIC_5_Handler,Dummy_Handler - - .weak EIC_6_Handler - .thumb_set EIC_6_Handler,Dummy_Handler - - .weak EIC_7_Handler - .thumb_set EIC_7_Handler,Dummy_Handler - - .weak EIC_8_Handler - .thumb_set EIC_8_Handler,Dummy_Handler - - .weak EIC_9_Handler - .thumb_set EIC_9_Handler,Dummy_Handler - - .weak EIC_10_Handler - .thumb_set EIC_10_Handler,Dummy_Handler - - .weak EIC_11_Handler - .thumb_set EIC_11_Handler,Dummy_Handler - - .weak EIC_12_Handler - .thumb_set EIC_12_Handler,Dummy_Handler - - .weak EIC_13_Handler - .thumb_set EIC_13_Handler,Dummy_Handler - - .weak EIC_14_Handler - .thumb_set EIC_14_Handler,Dummy_Handler - - .weak EIC_15_Handler - .thumb_set EIC_15_Handler,Dummy_Handler - - .weak FREQM_Handler - .thumb_set FREQM_Handler,Dummy_Handler - - .weak NVMCTRL_0_Handler - .thumb_set NVMCTRL_0_Handler,Dummy_Handler - - .weak NVMCTRL_1_Handler - .thumb_set NVMCTRL_1_Handler,Dummy_Handler - - .weak DMAC_0_Handler - .thumb_set DMAC_0_Handler,Dummy_Handler - - .weak DMAC_1_Handler - .thumb_set DMAC_1_Handler,Dummy_Handler - - .weak DMAC_2_Handler - .thumb_set DMAC_2_Handler,Dummy_Handler - - .weak DMAC_3_Handler - .thumb_set DMAC_3_Handler,Dummy_Handler - - .weak DMAC_4_Handler - .thumb_set DMAC_4_Handler,Dummy_Handler - - .weak EVSYS_0_Handler - .thumb_set EVSYS_0_Handler,Dummy_Handler - - .weak EVSYS_1_Handler - .thumb_set EVSYS_1_Handler,Dummy_Handler - - .weak EVSYS_2_Handler - .thumb_set EVSYS_2_Handler,Dummy_Handler - - .weak EVSYS_3_Handler - .thumb_set EVSYS_3_Handler,Dummy_Handler - - .weak EVSYS_4_Handler - .thumb_set EVSYS_4_Handler,Dummy_Handler - - .weak PAC_Handler - .thumb_set PAC_Handler,Dummy_Handler - - .weak TAL_0_Handler - .thumb_set TAL_0_Handler,Dummy_Handler - - .weak TAL_1_Handler - .thumb_set TAL_1_Handler,Dummy_Handler - - .weak RAMECC_Handler - .thumb_set RAMECC_Handler,Dummy_Handler - - .weak SERCOM0_0_Handler - .thumb_set SERCOM0_0_Handler,Dummy_Handler - - .weak SERCOM0_1_Handler - .thumb_set SERCOM0_1_Handler,Dummy_Handler - - .weak SERCOM0_2_Handler - .thumb_set SERCOM0_2_Handler,Dummy_Handler - - .weak SERCOM0_3_Handler - .thumb_set SERCOM0_3_Handler,Dummy_Handler - - .weak SERCOM1_0_Handler - .thumb_set SERCOM1_0_Handler,Dummy_Handler - - .weak SERCOM1_1_Handler - .thumb_set SERCOM1_1_Handler,Dummy_Handler - - .weak SERCOM1_2_Handler - .thumb_set SERCOM1_2_Handler,Dummy_Handler - - .weak SERCOM1_3_Handler - .thumb_set SERCOM1_3_Handler,Dummy_Handler - - .weak SERCOM2_0_Handler - .thumb_set SERCOM2_0_Handler,Dummy_Handler - - .weak SERCOM2_1_Handler - .thumb_set SERCOM2_1_Handler,Dummy_Handler - - .weak SERCOM2_2_Handler - .thumb_set SERCOM2_2_Handler,Dummy_Handler - - .weak SERCOM2_3_Handler - .thumb_set SERCOM2_3_Handler,Dummy_Handler - - .weak SERCOM3_0_Handler - .thumb_set SERCOM3_0_Handler,Dummy_Handler - - .weak SERCOM3_1_Handler - .thumb_set SERCOM3_1_Handler,Dummy_Handler - - .weak SERCOM3_2_Handler - .thumb_set SERCOM3_2_Handler,Dummy_Handler - - .weak SERCOM3_3_Handler - .thumb_set SERCOM3_3_Handler,Dummy_Handler - - .weak SERCOM4_0_Handler - .thumb_set SERCOM4_0_Handler,Dummy_Handler - - .weak SERCOM4_1_Handler - .thumb_set SERCOM4_1_Handler,Dummy_Handler - - .weak SERCOM4_2_Handler - .thumb_set SERCOM4_2_Handler,Dummy_Handler - - .weak SERCOM4_3_Handler - .thumb_set SERCOM4_3_Handler,Dummy_Handler - - .weak SERCOM5_0_Handler - .thumb_set SERCOM5_0_Handler,Dummy_Handler - - .weak SERCOM5_1_Handler - .thumb_set SERCOM5_1_Handler,Dummy_Handler - - .weak SERCOM5_2_Handler - .thumb_set SERCOM5_2_Handler,Dummy_Handler - - .weak SERCOM5_3_Handler - .thumb_set SERCOM5_3_Handler,Dummy_Handler - - .weak USB_0_Handler - .thumb_set USB_0_Handler,Dummy_Handler - - .weak USB_1_Handler - .thumb_set USB_1_Handler,Dummy_Handler - - .weak USB_2_Handler - .thumb_set USB_2_Handler,Dummy_Handler - - .weak USB_3_Handler - .thumb_set USB_3_Handler,Dummy_Handler - - .weak TCC0_0_Handler - .thumb_set TCC0_0_Handler,Dummy_Handler - - .weak TCC0_1_Handler - .thumb_set TCC0_1_Handler,Dummy_Handler - - .weak TCC0_2_Handler - .thumb_set TCC0_2_Handler,Dummy_Handler - - .weak TCC0_3_Handler - .thumb_set TCC0_3_Handler,Dummy_Handler - - .weak TCC0_4_Handler - .thumb_set TCC0_4_Handler,Dummy_Handler - - .weak TCC0_5_Handler - .thumb_set TCC0_5_Handler,Dummy_Handler - - .weak TCC0_6_Handler - .thumb_set TCC0_6_Handler,Dummy_Handler - - .weak TCC1_0_Handler - .thumb_set TCC1_0_Handler,Dummy_Handler - - .weak TCC1_1_Handler - .thumb_set TCC1_1_Handler,Dummy_Handler - - .weak TCC1_2_Handler - .thumb_set TCC1_2_Handler,Dummy_Handler - - .weak TCC1_3_Handler - .thumb_set TCC1_3_Handler,Dummy_Handler - - .weak TCC1_4_Handler - .thumb_set TCC1_4_Handler,Dummy_Handler - - .weak TCC2_0_Handler - .thumb_set TCC2_0_Handler,Dummy_Handler - - .weak TCC2_1_Handler - .thumb_set TCC2_1_Handler,Dummy_Handler - - .weak TCC2_2_Handler - .thumb_set TCC2_2_Handler,Dummy_Handler - - .weak TCC2_3_Handler - .thumb_set TCC2_3_Handler,Dummy_Handler - - .weak TCC3_0_Handler - .thumb_set TCC3_0_Handler,Dummy_Handler - - .weak TCC3_1_Handler - .thumb_set TCC3_1_Handler,Dummy_Handler - - .weak TCC3_2_Handler - .thumb_set TCC3_2_Handler,Dummy_Handler - - .weak TCC4_0_Handler - .thumb_set TCC4_0_Handler,Dummy_Handler - - .weak TCC4_1_Handler - .thumb_set TCC4_1_Handler,Dummy_Handler - - .weak TCC4_2_Handler - .thumb_set TCC4_2_Handler,Dummy_Handler - - .weak TC0_Handler - .thumb_set TC0_Handler,Dummy_Handler - - .weak TC1_Handler - .thumb_set TC1_Handler,Dummy_Handler - - .weak TC2_Handler - .thumb_set TC2_Handler,Dummy_Handler - - .weak TC3_Handler - .thumb_set TC3_Handler,Dummy_Handler - - .weak TC4_Handler - .thumb_set TC4_Handler,Dummy_Handler - - .weak TC5_Handler - .thumb_set TC5_Handler,Dummy_Handler - - .weak PDEC_0_Handler - .thumb_set PDEC_0_Handler,Dummy_Handler - - .weak PDEC_1_Handler - .thumb_set PDEC_1_Handler,Dummy_Handler - - .weak PDEC_2_Handler - .thumb_set PDEC_2_Handler,Dummy_Handler - - .weak ADC0_0_Handler - .thumb_set ADC0_0_Handler,Dummy_Handler - - .weak ADC0_1_Handler - .thumb_set ADC0_1_Handler,Dummy_Handler - - .weak ADC1_0_Handler - .thumb_set ADC1_0_Handler,Dummy_Handler - - .weak ADC1_1_Handler - .thumb_set ADC1_1_Handler,Dummy_Handler - - .weak AC_Handler - .thumb_set AC_Handler,Dummy_Handler - - .weak DAC_0_Handler - .thumb_set DAC_0_Handler,Dummy_Handler - - .weak DAC_1_Handler - .thumb_set DAC_1_Handler,Dummy_Handler - - .weak DAC_2_Handler - .thumb_set DAC_2_Handler,Dummy_Handler - - .weak DAC_3_Handler - .thumb_set DAC_3_Handler,Dummy_Handler - - .weak DAC_4_Handler - .thumb_set DAC_4_Handler,Dummy_Handler - - .weak I2S_Handler - .thumb_set I2S_Handler,Dummy_Handler - - .weak PCC_Handler - .thumb_set PCC_Handler,Dummy_Handler - - .weak AES_Handler - .thumb_set AES_Handler,Dummy_Handler - - .weak TRNG_Handler - .thumb_set TRNG_Handler,Dummy_Handler - - .weak ICM_Handler - .thumb_set ICM_Handler,Dummy_Handler - - .weak QSPI_Handler - .thumb_set QSPI_Handler,Dummy_Handler - - .weak SDHC0_Handler - .thumb_set SDHC0_Handler,Dummy_Handler - -#else - - .thumb_func - .weak PM_Handler -PM_Handler: - b . - - .thumb_func - .weak MCLK_Handler -MCLK_Handler: - b . - - .thumb_func - .weak OSCCTRL_0_Handler -OSCCTRL_0_Handler: - b . - - .thumb_func - .weak OSCCTRL_1_Handler -OSCCTRL_1_Handler: - b . - - .thumb_func - .weak OSCCTRL_2_Handler -OSCCTRL_2_Handler: - b . - - .thumb_func - .weak OSCCTRL_3_Handler -OSCCTRL_3_Handler: - b . - - .thumb_func - .weak OSCCTRL_4_Handler -OSCCTRL_4_Handler: - b . - - .thumb_func - .weak OSC32KCTRL_Handler -OSC32KCTRL_Handler: - b . - - .thumb_func - .weak SUPC_0_Handler -SUPC_0_Handler: - b . - - .thumb_func - .weak SUPC_1_Handler -SUPC_1_Handler: - b . - - .thumb_func - .weak WDT_Handler -WDT_Handler: - b . - - .thumb_func - .weak RTC_Handler -RTC_Handler: - b . - - .thumb_func - .weak EIC_0_Handler -EIC_0_Handler: - b . - - .thumb_func - .weak EIC_1_Handler -EIC_1_Handler: - b . - - .thumb_func - .weak EIC_2_Handler -EIC_2_Handler: - b . - - .thumb_func - .weak EIC_3_Handler -EIC_3_Handler: - b . - - .thumb_func - .weak EIC_4_Handler -EIC_4_Handler: - b . - - .thumb_func - .weak EIC_5_Handler -EIC_5_Handler: - b . - - .thumb_func - .weak EIC_6_Handler -EIC_6_Handler: - b . - - .thumb_func - .weak EIC_7_Handler -EIC_7_Handler: - b . - - .thumb_func - .weak EIC_8_Handler -EIC_8_Handler: - b . - - .thumb_func - .weak EIC_9_Handler -EIC_9_Handler: - b . - - .thumb_func - .weak EIC_10_Handler -EIC_10_Handler: - b . - - .thumb_func - .weak EIC_11_Handler -EIC_11_Handler: - b . - - .thumb_func - .weak EIC_12_Handler -EIC_12_Handler: - b . - - .thumb_func - .weak EIC_13_Handler -EIC_13_Handler: - b . - - .thumb_func - .weak EIC_14_Handler -EIC_14_Handler: - b . - - .thumb_func - .weak EIC_15_Handler -EIC_15_Handler: - b . - - .thumb_func - .weak FREQM_Handler -FREQM_Handler: - b . - - .thumb_func - .weak NVMCTRL_0_Handler -NVMCTRL_0_Handler: - b . - - .thumb_func - .weak NVMCTRL_1_Handler -NVMCTRL_1_Handler: - b . - - .thumb_func - .weak DMAC_0_Handler -DMAC_0_Handler: - b . - - .thumb_func - .weak DMAC_1_Handler -DMAC_1_Handler: - b . - - .thumb_func - .weak DMAC_2_Handler -DMAC_2_Handler: - b . - - .thumb_func - .weak DMAC_3_Handler -DMAC_3_Handler: - b . - - .thumb_func - .weak DMAC_4_Handler -DMAC_4_Handler: - b . - - .thumb_func - .weak EVSYS_0_Handler -EVSYS_0_Handler: - b . - - .thumb_func - .weak EVSYS_1_Handler -EVSYS_1_Handler: - b . - - .thumb_func - .weak EVSYS_2_Handler -EVSYS_2_Handler: - b . - - .thumb_func - .weak EVSYS_3_Handler -EVSYS_3_Handler: - b . - - .thumb_func - .weak EVSYS_4_Handler -EVSYS_4_Handler: - b . - - .thumb_func - .weak PAC_Handler -PAC_Handler: - b . - - .thumb_func - .weak TAL_0_Handler -TAL_0_Handler: - b . - - .thumb_func - .weak TAL_1_Handler -TAL_1_Handler: - b . - - .thumb_func - .weak RAMECC_Handler -RAMECC_Handler: - b . - - .thumb_func - .weak SERCOM0_0_Handler -SERCOM0_0_Handler: - b . - - .thumb_func - .weak SERCOM0_1_Handler -SERCOM0_1_Handler: - b . - - .thumb_func - .weak SERCOM0_2_Handler -SERCOM0_2_Handler: - b . - - .thumb_func - .weak SERCOM0_3_Handler -SERCOM0_3_Handler: - b . - - .thumb_func - .weak SERCOM1_0_Handler -SERCOM1_0_Handler: - b . - - .thumb_func - .weak SERCOM1_1_Handler -SERCOM1_1_Handler: - b . - - .thumb_func - .weak SERCOM1_2_Handler -SERCOM1_2_Handler: - b . - - .thumb_func - .weak SERCOM1_3_Handler -SERCOM1_3_Handler: - b . - - .thumb_func - .weak SERCOM2_0_Handler -SERCOM2_0_Handler: - b . - - .thumb_func - .weak SERCOM2_1_Handler -SERCOM2_1_Handler: - b . - - .thumb_func - .weak SERCOM2_2_Handler -SERCOM2_2_Handler: - b . - - .thumb_func - .weak SERCOM2_3_Handler -SERCOM2_3_Handler: - b . - - .thumb_func - .weak SERCOM3_0_Handler -SERCOM3_0_Handler: - b . - - .thumb_func - .weak SERCOM3_1_Handler -SERCOM3_1_Handler: - b . - - .thumb_func - .weak SERCOM3_2_Handler -SERCOM3_2_Handler: - b . - - .thumb_func - .weak SERCOM3_3_Handler -SERCOM3_3_Handler: - b . - - .thumb_func - .weak SERCOM4_0_Handler -SERCOM4_0_Handler: - b . - - .thumb_func - .weak SERCOM4_1_Handler -SERCOM4_1_Handler: - b . - - .thumb_func - .weak SERCOM4_2_Handler -SERCOM4_2_Handler: - b . - - .thumb_func - .weak SERCOM4_3_Handler -SERCOM4_3_Handler: - b . - - .thumb_func - .weak SERCOM5_0_Handler -SERCOM5_0_Handler: - b . - - .thumb_func - .weak SERCOM5_1_Handler -SERCOM5_1_Handler: - b . - - .thumb_func - .weak SERCOM5_2_Handler -SERCOM5_2_Handler: - b . - - .thumb_func - .weak SERCOM5_3_Handler -SERCOM5_3_Handler: - b . - - .thumb_func - .weak USB_0_Handler -USB_0_Handler: - b . - - .thumb_func - .weak USB_1_Handler -USB_1_Handler: - b . - - .thumb_func - .weak USB_2_Handler -USB_2_Handler: - b . - - .thumb_func - .weak USB_3_Handler -USB_3_Handler: - b . - - .thumb_func - .weak TCC0_0_Handler -TCC0_0_Handler: - b . - - .thumb_func - .weak TCC0_1_Handler -TCC0_1_Handler: - b . - - .thumb_func - .weak TCC0_2_Handler -TCC0_2_Handler: - b . - - .thumb_func - .weak TCC0_3_Handler -TCC0_3_Handler: - b . - - .thumb_func - .weak TCC0_4_Handler -TCC0_4_Handler: - b . - - .thumb_func - .weak TCC0_5_Handler -TCC0_5_Handler: - b . - - .thumb_func - .weak TCC0_6_Handler -TCC0_6_Handler: - b . - - .thumb_func - .weak TCC1_0_Handler -TCC1_0_Handler: - b . - - .thumb_func - .weak TCC1_1_Handler -TCC1_1_Handler: - b . - - .thumb_func - .weak TCC1_2_Handler -TCC1_2_Handler: - b . - - .thumb_func - .weak TCC1_3_Handler -TCC1_3_Handler: - b . - - .thumb_func - .weak TCC1_4_Handler -TCC1_4_Handler: - b . - - .thumb_func - .weak TCC2_0_Handler -TCC2_0_Handler: - b . - - .thumb_func - .weak TCC2_1_Handler -TCC2_1_Handler: - b . - - .thumb_func - .weak TCC2_2_Handler -TCC2_2_Handler: - b . - - .thumb_func - .weak TCC2_3_Handler -TCC2_3_Handler: - b . - - .thumb_func - .weak TCC3_0_Handler -TCC3_0_Handler: - b . - - .thumb_func - .weak TCC3_1_Handler -TCC3_1_Handler: - b . - - .thumb_func - .weak TCC3_2_Handler -TCC3_2_Handler: - b . - - .thumb_func - .weak TCC4_0_Handler -TCC4_0_Handler: - b . - - .thumb_func - .weak TCC4_1_Handler -TCC4_1_Handler: - b . - - .thumb_func - .weak TCC4_2_Handler -TCC4_2_Handler: - b . - - .thumb_func - .weak TC0_Handler -TC0_Handler: - b . - - .thumb_func - .weak TC1_Handler -TC1_Handler: - b . - - .thumb_func - .weak TC2_Handler -TC2_Handler: - b . - - .thumb_func - .weak TC3_Handler -TC3_Handler: - b . - - .thumb_func - .weak TC4_Handler -TC4_Handler: - b . - - .thumb_func - .weak TC5_Handler -TC5_Handler: - b . - - .thumb_func - .weak PDEC_0_Handler -PDEC_0_Handler: - b . - - .thumb_func - .weak PDEC_1_Handler -PDEC_1_Handler: - b . - - .thumb_func - .weak PDEC_2_Handler -PDEC_2_Handler: - b . - - .thumb_func - .weak ADC0_0_Handler -ADC0_0_Handler: - b . - - .thumb_func - .weak ADC0_1_Handler -ADC0_1_Handler: - b . - - .thumb_func - .weak ADC1_0_Handler -ADC1_0_Handler: - b . - - .thumb_func - .weak ADC1_1_Handler -ADC1_1_Handler: - b . - - .thumb_func - .weak AC_Handler -AC_Handler: - b . - - .thumb_func - .weak DAC_0_Handler -DAC_0_Handler: - b . - - .thumb_func - .weak DAC_1_Handler -DAC_1_Handler: - b . - - .thumb_func - .weak DAC_2_Handler -DAC_2_Handler: - b . - - .thumb_func - .weak DAC_3_Handler -DAC_3_Handler: - b . - - .thumb_func - .weak DAC_4_Handler -DAC_4_Handler: - b . - - .thumb_func - .weak I2S_Handler -I2S_Handler: - b . - - .thumb_func - .weak PCC_Handler -PCC_Handler: - b . - - .thumb_func - .weak AES_Handler -AES_Handler: - b . - - .thumb_func - .weak TRNG_Handler -TRNG_Handler: - b . - - .thumb_func - .weak ICM_Handler -ICM_Handler: - b . - - .thumb_func - .weak QSPI_Handler -QSPI_Handler: - b . - - .thumb_func - .weak SDHC0_Handler -SDHC0_Handler: - b . - -#endif - -/***************************************************************************** - * Vector Table * - *****************************************************************************/ - - .section .vectors, "ax" - .align 0 - .global _vectors - .extern __stack_end__ -#ifdef STARTUP_FROM_RESET - .extern Reset_Handler -#endif - -_vectors: - .word __stack_end__ -#ifdef STARTUP_FROM_RESET - .word Reset_Handler -#else - .word Reset_Wait -#endif - .word NMI_Handler - .word HardFault_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word SVC_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word PendSV_Handler - .word SysTick_Handler - .word PM_Handler - .word MCLK_Handler - .word OSCCTRL_0_Handler - .word OSCCTRL_1_Handler - .word OSCCTRL_2_Handler - .word OSCCTRL_3_Handler - .word OSCCTRL_4_Handler - .word OSC32KCTRL_Handler - .word SUPC_0_Handler - .word SUPC_1_Handler - .word WDT_Handler - .word RTC_Handler - .word EIC_0_Handler - .word EIC_1_Handler - .word EIC_2_Handler - .word EIC_3_Handler - .word EIC_4_Handler - .word EIC_5_Handler - .word EIC_6_Handler - .word EIC_7_Handler - .word EIC_8_Handler - .word EIC_9_Handler - .word EIC_10_Handler - .word EIC_11_Handler - .word EIC_12_Handler - .word EIC_13_Handler - .word EIC_14_Handler - .word EIC_15_Handler - .word FREQM_Handler - .word NVMCTRL_0_Handler - .word NVMCTRL_1_Handler - .word DMAC_0_Handler - .word DMAC_1_Handler - .word DMAC_2_Handler - .word DMAC_3_Handler - .word DMAC_4_Handler - .word EVSYS_0_Handler - .word EVSYS_1_Handler - .word EVSYS_2_Handler - .word EVSYS_3_Handler - .word EVSYS_4_Handler - .word PAC_Handler - .word TAL_0_Handler - .word TAL_1_Handler - .word Dummy_Handler /* Reserved */ - .word RAMECC_Handler - .word SERCOM0_0_Handler - .word SERCOM0_1_Handler - .word SERCOM0_2_Handler - .word SERCOM0_3_Handler - .word SERCOM1_0_Handler - .word SERCOM1_1_Handler - .word SERCOM1_2_Handler - .word SERCOM1_3_Handler - .word SERCOM2_0_Handler - .word SERCOM2_1_Handler - .word SERCOM2_2_Handler - .word SERCOM2_3_Handler - .word SERCOM3_0_Handler - .word SERCOM3_1_Handler - .word SERCOM3_2_Handler - .word SERCOM3_3_Handler - .word SERCOM4_0_Handler - .word SERCOM4_1_Handler - .word SERCOM4_2_Handler - .word SERCOM4_3_Handler - .word SERCOM5_0_Handler - .word SERCOM5_1_Handler - .word SERCOM5_2_Handler - .word SERCOM5_3_Handler - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word USB_0_Handler - .word USB_1_Handler - .word USB_2_Handler - .word USB_3_Handler - .word Dummy_Handler /* Reserved */ - .word TCC0_0_Handler - .word TCC0_1_Handler - .word TCC0_2_Handler - .word TCC0_3_Handler - .word TCC0_4_Handler - .word TCC0_5_Handler - .word TCC0_6_Handler - .word TCC1_0_Handler - .word TCC1_1_Handler - .word TCC1_2_Handler - .word TCC1_3_Handler - .word TCC1_4_Handler - .word TCC2_0_Handler - .word TCC2_1_Handler - .word TCC2_2_Handler - .word TCC2_3_Handler - .word TCC3_0_Handler - .word TCC3_1_Handler - .word TCC3_2_Handler - .word TCC4_0_Handler - .word TCC4_1_Handler - .word TCC4_2_Handler - .word TC0_Handler - .word TC1_Handler - .word TC2_Handler - .word TC3_Handler - .word TC4_Handler - .word TC5_Handler - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word PDEC_0_Handler - .word PDEC_1_Handler - .word PDEC_2_Handler - .word ADC0_0_Handler - .word ADC0_1_Handler - .word ADC1_0_Handler - .word ADC1_1_Handler - .word AC_Handler - .word DAC_0_Handler - .word DAC_1_Handler - .word DAC_2_Handler - .word DAC_3_Handler - .word DAC_4_Handler - .word I2S_Handler - .word PCC_Handler - .word AES_Handler - .word TRNG_Handler - .word ICM_Handler - .word Dummy_Handler /* Reserved */ - .word QSPI_Handler - .word SDHC0_Handler -_vectors_end: - -#ifdef VECTORS_IN_RAM - .section .vectors_ram, "ax" - .align 0 - .global _vectors_ram - -_vectors_ram: - .space _vectors_end - _vectors, 0 -#endif diff --git a/examples/device/cdc_msc_freertos/ses/samd51/SAMD51_Startup.s b/examples/device/cdc_msc_freertos/ses/samd51/SAMD51_Startup.s deleted file mode 100644 index 03bf54de..00000000 --- a/examples/device/cdc_msc_freertos/ses/samd51/SAMD51_Startup.s +++ /dev/null @@ -1,128 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * NO_FPU_ENABLE * - * * - * If defined, FPU will not be enabled. * - * * - * NO_STACK_INIT * - * * - * If defined, the stack pointer will not be initialised. * - * * - * NO_SYSTEM_INIT * - * * - * If defined, the SystemInit() function will not be called. By default * - * SystemInit() is called after reset to enable the clocks and memories to * - * be initialised prior to any C startup initialisation. * - * * - * NO_VTOR_CONFIG * - * * - * If defined, the vector table offset register will not be configured. * - * * - * MEMORY_INIT * - * * - * If defined, the MemoryInit() function will be called. By default * - * MemoryInit() is called after SystemInit() to enable an external memory * - * controller. * - * * - * STACK_INIT_VAL * - * * - * If defined, specifies the initial stack pointer value. If undefined, * - * the stack pointer will be initialised to point to the end of the * - * RAM segment. * - * * - * VECTORS_IN_RAM * - * * - * If defined, the exception vectors will be copied from Flash to RAM. * - * * - *****************************************************************************/ - - .syntax unified - - .global Reset_Handler - .extern _vectors - - .section .init, "ax" - .thumb_func - - .equ VTOR_REG, 0xE000ED08 - .equ FPU_CPACR_REG, 0xE000ED88 - -#ifndef STACK_INIT_VAL -#define STACK_INIT_VAL __RAM_segment_end__ -#endif - -Reset_Handler: -#ifndef NO_STACK_INIT - /* Initialise main stack */ - ldr r0, =STACK_INIT_VAL - bic r0, #0x7 - mov sp, r0 -#endif - -#ifndef NO_SYSTEM_INIT - /* Initialise system */ - ldr r0, =SystemInit - blx r0 - .pushsection .init_array, "aw", %init_array - .word SystemCoreClockUpdate - .popsection -#endif - -#ifdef MEMORY_INIT - ldr r0, =MemoryInit - blx r0 -#endif - -#ifdef VECTORS_IN_RAM - /* Copy exception vectors into RAM */ - ldr r0, =__vectors_start__ - ldr r1, =__vectors_end__ - ldr r2, =__vectors_ram_start__ -1: - cmp r0, r1 - beq 2f - ldr r3, [r0] - str r3, [r2] - adds r0, r0, #4 - adds r2, r2, #4 - b 1b -2: -#endif - -#ifndef NO_VTOR_CONFIG - /* Configure vector table offset register */ - ldr r0, =VTOR_REG -#ifdef VECTORS_IN_RAM - ldr r1, =_vectors_ram -#else - ldr r1, =_vectors -#endif - str r1, [r0] -#endif - -#if (defined(__ARM_ARCH_FPV4_SP_D16__) || defined(__ARM_ARCH_FPV5_D16__)) && !defined(NO_FPU_ENABLE) - /* Enable FPU */ - ldr r0, =FPU_CPACR_REG - ldr r1, [r0] - orr r1, r1, #(0xF << 20) - str r1, [r0] - dsb - isb -#endif - - /* Jump to program start */ - b _start - - diff --git a/examples/device/cdc_msc_freertos/ses/samd51/SAMD51_Target.js b/examples/device/cdc_msc_freertos/ses/samd51/SAMD51_Target.js deleted file mode 100644 index 20560af4..00000000 --- a/examples/device/cdc_msc_freertos/ses/samd51/SAMD51_Target.js +++ /dev/null @@ -1,19 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -function Reset() { - TargetInterface.resetAndStop(); -} - -function EnableTrace(traceInterfaceType) { - // TODO: Enable trace -} - diff --git a/examples/device/cdc_msc_freertos/ses/samd51/flash_placement.xml b/examples/device/cdc_msc_freertos/ses/samd51/flash_placement.xml deleted file mode 100644 index 79bedc53..00000000 --- a/examples/device/cdc_msc_freertos/ses/samd51/flash_placement.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc_freertos/ses/samd51/samd51.emProject b/examples/device/cdc_msc_freertos/ses/samd51/samd51.emProject deleted file mode 100644 index 77ff38b6..00000000 --- a/examples/device/cdc_msc_freertos/ses/samd51/samd51.emProject +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/device/cdc_msc_freertos/ses/samd51/thumb_crt0.s b/examples/device/cdc_msc_freertos/ses/samd51/thumb_crt0.s deleted file mode 100644 index 17f88e0c..00000000 --- a/examples/device/cdc_msc_freertos/ses/samd51/thumb_crt0.s +++ /dev/null @@ -1,415 +0,0 @@ -// ********************************************************************** -// * SEGGER Microcontroller GmbH * -// * The Embedded Experts * -// ********************************************************************** -// * * -// * (c) 2014 - 2018 SEGGER Microcontroller GmbH * -// * (c) 2001 - 2018 Rowley Associates Limited * -// * * -// * www.segger.com Support: support@segger.com * -// * * -// ********************************************************************** -// * * -// * All rights reserved. * -// * * -// * Redistribution and use in source and binary forms, with or * -// * without modification, are permitted provided that the following * -// * conditions are met: * -// * * -// * - Redistributions of source code must retain the above copyright * -// * notice, this list of conditions and the following disclaimer. * -// * * -// * - Neither the name of SEGGER Microcontroller GmbH * -// * nor the names of its contributors may be used to endorse or * -// * promote products derived from this software without specific * -// * prior written permission. * -// * * -// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -// * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -// * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -// * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -// * DISCLAIMED. * -// * IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -// * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -// * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -// * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -// * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -// * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -// * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -// * DAMAGE. * -// * * -// ********************************************************************** -// -// -// Preprocessor Definitions -// ------------------------ -// APP_ENTRY_POINT -// -// Defines the application entry point function, if undefined this setting -// defaults to "main". -// -// INITIALIZE_STACK -// -// If defined, the contents of the stack will be initialized to a the -// value 0xCC. -// -// INITIALIZE_SECONDARY_SECTIONS -// -// If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized. -// -// INITIALIZE_TCM_SECTIONS -// -// If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections -// will be initialized. -// -// INITIALIZE_USER_SECTIONS -// -// If defined, the function InitializeUserMemorySections will be called prior -// to entering main in order to allow the user to initialize any user defined -// memory sections. -// -// FULL_LIBRARY -// -// If defined then -// - argc, argv are setup by the debug_getargs. -// - the exit symbol is defined and executes on return from main. -// - the exit symbol calls destructors, atexit functions and then debug_exit. -// -// If not defined then -// - argc and argv are zero. -// - the exit symbol is defined, executes on return from main and loops -// - -#ifndef APP_ENTRY_POINT -#define APP_ENTRY_POINT main -#endif - -#ifndef ARGSSPACE -#define ARGSSPACE 128 -#endif - .syntax unified - - .global _start - .extern APP_ENTRY_POINT - .global exit - .weak exit - -#ifdef INITIALIZE_USER_SECTIONS - .extern InitializeUserMemorySections -#endif - - .section .init, "ax" - .code 16 - .balign 2 - .thumb_func - -_start: - /* Set up main stack if size > 0 */ - ldr r1, =__stack_end__ - ldr r0, =__stack_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - mov sp, r1 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - ldr r0, =__stack_start__ - bl memory_set -#endif -1: - - /* Set up process stack if size > 0 */ - ldr r1, =__stack_process_end__ - ldr r0, =__stack_process_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - msr psp, r1 - movs r2, #2 - msr control, r2 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - bl memory_set -#endif -1: - - /* Copy initialized memory sections into RAM (if necessary). */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl memory_copy - ldr r0, =__tdata_load_start__ - ldr r1, =__tdata_start__ - ldr r2, =__tdata_end__ - bl memory_copy -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__data2_load_start__ - ldr r1, =__data2_start__ - ldr r2, =__data2_end__ - bl memory_copy - ldr r0, =__text2_load_start__ - ldr r1, =__text2_start__ - ldr r2, =__text2_end__ - bl memory_copy - ldr r0, =__rodata2_load_start__ - ldr r1, =__rodata2_start__ - ldr r2, =__rodata2_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__data_tcm_load_start__ - ldr r1, =__data_tcm_start__ - ldr r2, =__data_tcm_end__ - bl memory_copy - ldr r0, =__text_tcm_load_start__ - ldr r1, =__text_tcm_start__ - ldr r2, =__text_tcm_end__ - bl memory_copy - ldr r0, =__rodata_tcm_load_start__ - ldr r1, =__rodata_tcm_start__ - ldr r2, =__rodata_tcm_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Zero the bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - movs r2, #0 - bl memory_set - ldr r0, =__tbss_start__ - ldr r1, =__tbss_end__ - movs r2, #0 - bl memory_set -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__bss2_start__ - ldr r1, =__bss2_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__bss_tcm_start__ - ldr r1, =__bss_tcm_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Initialize the heap */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - subs r1, r1, r0 - cmp r1, #8 - blt 1f - movs r2, #0 - str r2, [r0] - adds r0, r0, #4 - str r1, [r0] -1: - -#ifdef INITIALIZE_USER_SECTIONS - ldr r2, =InitializeUserMemorySections - blx r2 -#endif - - /* Call constructors */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -ctor_loop: - cmp r0, r1 - beq ctor_end - ldr r2, [r0] - adds r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b ctor_loop -ctor_end: - - /* Setup initial call frame */ - movs r0, #0 - mov lr, r0 - mov r12, sp - - .type start, function -start: - /* Jump to application entry point */ -#ifdef FULL_LIBRARY - movs r0, #ARGSSPACE - ldr r1, =args - ldr r2, =debug_getargs - blx r2 - ldr r1, =args -#else - movs r0, #0 - movs r1, #0 -#endif - ldr r2, =APP_ENTRY_POINT - blx r2 - - .thumb_func -exit: -#ifdef FULL_LIBRARY - mov r5, r0 // save the exit parameter/return result - - /* Call destructors */ - ldr r0, =__dtors_start__ - ldr r1, =__dtors_end__ -dtor_loop: - cmp r0, r1 - beq dtor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b dtor_loop -dtor_end: - - /* Call atexit functions */ - ldr r2, =_execute_at_exit_fns - blx r2 - - /* Call debug_exit with return result/exit parameter */ - mov r0, r5 - ldr r2, =debug_exit - blx r2 -#endif - - /* Returned from application entry point, loop forever. */ -exit_loop: - b exit_loop - - .thumb_func -memory_copy: - cmp r0, r1 - beq 2f - subs r2, r2, r1 - beq 2f -1: - ldrb r3, [r0] - adds r0, r0, #1 - strb r3, [r1] - adds r1, r1, #1 - subs r2, r2, #1 - bne 1b -2: - bx lr - - .thumb_func -memory_set: - cmp r0, r1 - beq 1f - strb r2, [r0] - adds r0, r0, #1 - b memory_set -1: - bx lr - - // default C/C++ library helpers - -.macro HELPER helper_name - .section .text.\helper_name, "ax", %progbits - .balign 2 - .global \helper_name - .weak \helper_name -\helper_name: - .thumb_func -.endm - -.macro JUMPTO name -#if defined(__thumb__) && !defined(__thumb2__) - mov r12, r0 - ldr r0, =\name - push {r0} - mov r0, r12 - pop {pc} -#else - b \name -#endif -.endm - -HELPER __aeabi_read_tp - ldr r0, =__tbss_start__-8 - bx lr -HELPER abort - b . -HELPER __assert - b . -HELPER __aeabi_assert - b . -HELPER __sync_synchronize - bx lr -HELPER __getchar - JUMPTO debug_getchar -HELPER __putchar - JUMPTO debug_putchar -HELPER __open - JUMPTO debug_fopen -HELPER __close - JUMPTO debug_fclose -HELPER __write - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fwrite -HELPER __read - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fread -HELPER __seek - push {r4, lr} - mov r4, r0 - bl debug_fseek - cmp r0, #0 - bne 1f - mov r0, r4 - bl debug_ftell - pop {r4, pc} -1: - ldr r0, =-1 - pop {r4, pc} - // char __user_locale_name_buffer[]; - .section .bss.__user_locale_name_buffer, "aw", %nobits - .global __user_locale_name_buffer - .weak __user_locale_name_buffer - __user_locale_name_buffer: - .word 0x0 - -#ifdef FULL_LIBRARY - .bss -args: - .space ARGSSPACE -#endif - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - diff --git a/examples/host/cdc_msc_hid/ses/cdc_msc_hid.emProject b/examples/host/cdc_msc_hid/ses/cdc_msc_hid.emProject deleted file mode 100644 index 208ea66e..00000000 --- a/examples/host/cdc_msc_hid/ses/cdc_msc_hid.emProject +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC1700_Startup.s b/examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC1700_Startup.s deleted file mode 100644 index f039ad93..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC1700_Startup.s +++ /dev/null @@ -1,109 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2015 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * NO_STACK_INIT * - * * - * If defined, the stack pointer will not be initialised. * - * * - * NO_SYSTEM_INIT * - * * - * If defined, the SystemInit() function will not be called. By default * - * SystemInit() is called after reset to enable the clocks and memories to * - * be initialised prior to any C startup initialisation. * - * * - * NO_VTOR_CONFIG * - * * - * If defined, the vector table offset register will not be configured. * - * * - * MEMORY_INIT * - * * - * If defined, the MemoryInit() function will be called. By default * - * MemoryInit() is called after SystemInit() to enable an external memory * - * controller. * - * * - * STACK_INIT_VAL * - * * - * If defined, specifies the initial stack pointer value. If undefined, * - * the stack pointer will be initialised to point to the end of the * - * RAM segment. * - * * - * VECTORS_IN_RAM * - * * - * If defined, the exception vectors will be copied from Flash to RAM. * - * * - *****************************************************************************/ - - .syntax unified - - .global Reset_Handler - .extern _vectors - - .section .init, "ax" - .thumb_func - - .equ VTOR_REG, 0xE000ED08 - -#ifndef STACK_INIT_VAL -#define STACK_INIT_VAL __RAM_segment_end__ -#endif - -Reset_Handler: -#ifndef NO_STACK_INIT - /* Initialise main stack */ - ldr r0, =STACK_INIT_VAL - bic r0, #0x7 - mov sp, r0 -#endif -#ifndef NO_SYSTEM_INIT - /* Initialise system */ - ldr r0, =SystemInit - blx r0 -#endif - -#ifdef MEMORY_INIT - ldr r0, =MemoryInit - blx r0 -#endif - -#ifdef VECTORS_IN_RAM - /* Copy exception vectors into RAM */ - ldr r0, =__vectors_start__ - ldr r1, =__vectors_end__ - ldr r2, =__vectors_ram_start__ -1: - cmp r0, r1 - beq 2f - ldr r3, [r0] - str r3, [r2] - adds r0, r0, #4 - adds r2, r2, #4 - b 1b -2: -#endif - -#ifndef NO_VTOR_CONFIG - /* Configure vector table offset register */ - ldr r0, =VTOR_REG -#ifdef VECTORS_IN_RAM - ldr r1, =_vectors_ram -#else - ldr r1, =_vectors -#endif - str r1, [r0] -#endif - - /* Jump to program start */ - b _start - - diff --git a/examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC1700_Target.js b/examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC1700_Target.js deleted file mode 100644 index 7f945a3d..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC1700_Target.js +++ /dev/null @@ -1,19 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2015 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -function Reset() { - TargetInterface.resetAndStop(); -} - -function EnableTrace(traceInterfaceType) { - // TODO: Enable trace -} - diff --git a/examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC1769_MemoryMap.xml b/examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC1769_MemoryMap.xml deleted file mode 100644 index d9c07aea..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC1769_MemoryMap.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC176x5x_Registers.xml b/examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC176x5x_Registers.xml deleted file mode 100644 index fd38966b..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC176x5x_Registers.xml +++ /dev/null @@ -1,11058 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC176x5x_Vectors.s b/examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC176x5x_Vectors.s deleted file mode 100644 index c5fae131..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc175x_6x/LPC176x5x_Vectors.s +++ /dev/null @@ -1,418 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2015 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * VECTORS_IN_RAM * - * * - * If defined, an area of RAM will large enough to store the vector table * - * will be reserved. * - * * - *****************************************************************************/ - - .syntax unified - .code 16 - - .section .init, "ax" - .align 0 - -/***************************************************************************** - * Default Exception Handlers * - *****************************************************************************/ - - .thumb_func - .weak NMI_Handler -NMI_Handler: - b . - - .thumb_func - .weak HardFault_Handler -HardFault_Handler: - b . - - .thumb_func - .weak SVC_Handler -SVC_Handler: - b . - - .thumb_func - .weak PendSV_Handler -PendSV_Handler: - b . - - .thumb_func - .weak SysTick_Handler -SysTick_Handler: - b . - - .thumb_func -Dummy_Handler: - b . - -#if defined(__OPTIMIZATION_SMALL) - - .weak WDT_IRQHandler - .thumb_set WDT_IRQHandler,Dummy_Handler - - .weak TIMER0_IRQHandler - .thumb_set TIMER0_IRQHandler,Dummy_Handler - - .weak TIMER1_IRQHandler - .thumb_set TIMER1_IRQHandler,Dummy_Handler - - .weak TIMER2_IRQHandler - .thumb_set TIMER2_IRQHandler,Dummy_Handler - - .weak TIMER3_IRQHandler - .thumb_set TIMER3_IRQHandler,Dummy_Handler - - .weak UART0_IRQHandler - .thumb_set UART0_IRQHandler,Dummy_Handler - - .weak UART1_IRQHandler - .thumb_set UART1_IRQHandler,Dummy_Handler - - .weak UART2_IRQHandler - .thumb_set UART2_IRQHandler,Dummy_Handler - - .weak UART3_IRQHandler - .thumb_set UART3_IRQHandler,Dummy_Handler - - .weak PWM1_IRQHandler - .thumb_set PWM1_IRQHandler,Dummy_Handler - - .weak I2C0_IRQHandler - .thumb_set I2C0_IRQHandler,Dummy_Handler - - .weak I2C1_IRQHandler - .thumb_set I2C1_IRQHandler,Dummy_Handler - - .weak I2C2_IRQHandler - .thumb_set I2C2_IRQHandler,Dummy_Handler - - .weak SPI_IRQHandler - .thumb_set SPI_IRQHandler,Dummy_Handler - - .weak SSP0_IRQHandler - .thumb_set SSP0_IRQHandler,Dummy_Handler - - .weak SSP1_IRQHandler - .thumb_set SSP1_IRQHandler,Dummy_Handler - - .weak PLL0_IRQHandler - .thumb_set PLL0_IRQHandler,Dummy_Handler - - .weak RTC_IRQHandler - .thumb_set RTC_IRQHandler,Dummy_Handler - - .weak EINT0_IRQHandler - .thumb_set EINT0_IRQHandler,Dummy_Handler - - .weak EINT1_IRQHandler - .thumb_set EINT1_IRQHandler,Dummy_Handler - - .weak EINT2_IRQHandler - .thumb_set EINT2_IRQHandler,Dummy_Handler - - .weak EINT3_IRQHandler - .thumb_set EINT3_IRQHandler,Dummy_Handler - - .weak ADC_IRQHandler - .thumb_set ADC_IRQHandler,Dummy_Handler - - .weak BOD_IRQHandler - .thumb_set BOD_IRQHandler,Dummy_Handler - - .weak USB_IRQHandler - .thumb_set USB_IRQHandler,Dummy_Handler - - .weak CAN_IRQHandler - .thumb_set CAN_IRQHandler,Dummy_Handler - - .weak DMA_IRQHandler - .thumb_set DMA_IRQHandler,Dummy_Handler - - .weak I2S_IRQHandler - .thumb_set I2S_IRQHandler,Dummy_Handler - - .weak ENET_IRQHandler - .thumb_set ENET_IRQHandler,Dummy_Handler - - .weak RIT_IRQHandler - .thumb_set RIT_IRQHandler,Dummy_Handler - - .weak MCPWM_IRQHandler - .thumb_set MCPWM_IRQHandler,Dummy_Handler - - .weak QEI_IRQHandler - .thumb_set QEI_IRQHandler,Dummy_Handler - - .weak PLL1_IRQHandler - .thumb_set PLL1_IRQHandler,Dummy_Handler - - .weak USBActivity_IRQHandler - .thumb_set USBActivity_IRQHandler,Dummy_Handler - - .weak CANActivity_IRQHandler - .thumb_set CANActivity_IRQHandler,Dummy_Handler - -#else - - .thumb_func - .weak WDT_IRQHandler -WDT_IRQHandler: - b . - - .thumb_func - .weak TIMER0_IRQHandler -TIMER0_IRQHandler: - b . - - .thumb_func - .weak TIMER1_IRQHandler -TIMER1_IRQHandler: - b . - - .thumb_func - .weak TIMER2_IRQHandler -TIMER2_IRQHandler: - b . - - .thumb_func - .weak TIMER3_IRQHandler -TIMER3_IRQHandler: - b . - - .thumb_func - .weak UART0_IRQHandler -UART0_IRQHandler: - b . - - .thumb_func - .weak UART1_IRQHandler -UART1_IRQHandler: - b . - - .thumb_func - .weak UART2_IRQHandler -UART2_IRQHandler: - b . - - .thumb_func - .weak UART3_IRQHandler -UART3_IRQHandler: - b . - - .thumb_func - .weak PWM1_IRQHandler -PWM1_IRQHandler: - b . - - .thumb_func - .weak I2C0_IRQHandler -I2C0_IRQHandler: - b . - - .thumb_func - .weak I2C1_IRQHandler -I2C1_IRQHandler: - b . - - .thumb_func - .weak I2C2_IRQHandler -I2C2_IRQHandler: - b . - - .thumb_func - .weak SPI_IRQHandler -SPI_IRQHandler: - b . - - .thumb_func - .weak SSP0_IRQHandler -SSP0_IRQHandler: - b . - - .thumb_func - .weak SSP1_IRQHandler -SSP1_IRQHandler: - b . - - .thumb_func - .weak PLL0_IRQHandler -PLL0_IRQHandler: - b . - - .thumb_func - .weak RTC_IRQHandler -RTC_IRQHandler: - b . - - .thumb_func - .weak EINT0_IRQHandler -EINT0_IRQHandler: - b . - - .thumb_func - .weak EINT1_IRQHandler -EINT1_IRQHandler: - b . - - .thumb_func - .weak EINT2_IRQHandler -EINT2_IRQHandler: - b . - - .thumb_func - .weak EINT3_IRQHandler -EINT3_IRQHandler: - b . - - .thumb_func - .weak ADC_IRQHandler -ADC_IRQHandler: - b . - - .thumb_func - .weak BOD_IRQHandler -BOD_IRQHandler: - b . - - .thumb_func - .weak USB_IRQHandler -USB_IRQHandler: - b . - - .thumb_func - .weak CAN_IRQHandler -CAN_IRQHandler: - b . - - .thumb_func - .weak DMA_IRQHandler -DMA_IRQHandler: - b . - - .thumb_func - .weak I2S_IRQHandler -I2S_IRQHandler: - b . - - .thumb_func - .weak ENET_IRQHandler -ENET_IRQHandler: - b . - - .thumb_func - .weak RIT_IRQHandler -RIT_IRQHandler: - b . - - .thumb_func - .weak MCPWM_IRQHandler -MCPWM_IRQHandler: - b . - - .thumb_func - .weak QEI_IRQHandler -QEI_IRQHandler: - b . - - .thumb_func - .weak PLL1_IRQHandler -PLL1_IRQHandler: - b . - - .thumb_func - .weak USBActivity_IRQHandler -USBActivity_IRQHandler: - b . - - .thumb_func - .weak CANActivity_IRQHandler -CANActivity_IRQHandler: - b . - -#endif - -/***************************************************************************** - * Vector Table * - *****************************************************************************/ - - .section .vectors, "ax" - .align 0 - .global _vectors - .extern __stack_end__ - .extern Reset_Handler - -_vectors: - .word __stack_end__ - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word SVC_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word PendSV_Handler - .word SysTick_Handler - .word WDT_IRQHandler - .word TIMER0_IRQHandler - .word TIMER1_IRQHandler - .word TIMER2_IRQHandler - .word TIMER3_IRQHandler - .word UART0_IRQHandler - .word UART1_IRQHandler - .word UART2_IRQHandler - .word UART3_IRQHandler - .word PWM1_IRQHandler - .word I2C0_IRQHandler - .word I2C1_IRQHandler - .word I2C2_IRQHandler - .word SPI_IRQHandler - .word SSP0_IRQHandler - .word SSP1_IRQHandler - .word PLL0_IRQHandler - .word RTC_IRQHandler - .word EINT0_IRQHandler - .word EINT1_IRQHandler - .word EINT2_IRQHandler - .word EINT3_IRQHandler - .word ADC_IRQHandler - .word BOD_IRQHandler - .word USB_IRQHandler - .word CAN_IRQHandler - .word DMA_IRQHandler - .word I2S_IRQHandler - .word ENET_IRQHandler - .word RIT_IRQHandler - .word MCPWM_IRQHandler - .word QEI_IRQHandler - .word PLL1_IRQHandler - .word USBActivity_IRQHandler - .word CANActivity_IRQHandler -_vectors_end: - -#ifdef VECTORS_IN_RAM - .section .vectors_ram, "ax" - .align 0 - .global _vectors_ram - -_vectors_ram: - .space _vectors_end - _vectors, 0 -#endif diff --git a/examples/host/cdc_msc_hid/ses/lpc175x_6x/flash_placement.xml b/examples/host/cdc_msc_hid/ses/lpc175x_6x/flash_placement.xml deleted file mode 100644 index 79bedc53..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc175x_6x/flash_placement.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/host/cdc_msc_hid/ses/lpc175x_6x/lpc175x_6x.emProject b/examples/host/cdc_msc_hid/ses/lpc175x_6x/lpc175x_6x.emProject deleted file mode 100644 index 8a2c3639..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc175x_6x/lpc175x_6x.emProject +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/host/cdc_msc_hid/ses/lpc175x_6x/thumb_crt0.s b/examples/host/cdc_msc_hid/ses/lpc175x_6x/thumb_crt0.s deleted file mode 100644 index 17f88e0c..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc175x_6x/thumb_crt0.s +++ /dev/null @@ -1,415 +0,0 @@ -// ********************************************************************** -// * SEGGER Microcontroller GmbH * -// * The Embedded Experts * -// ********************************************************************** -// * * -// * (c) 2014 - 2018 SEGGER Microcontroller GmbH * -// * (c) 2001 - 2018 Rowley Associates Limited * -// * * -// * www.segger.com Support: support@segger.com * -// * * -// ********************************************************************** -// * * -// * All rights reserved. * -// * * -// * Redistribution and use in source and binary forms, with or * -// * without modification, are permitted provided that the following * -// * conditions are met: * -// * * -// * - Redistributions of source code must retain the above copyright * -// * notice, this list of conditions and the following disclaimer. * -// * * -// * - Neither the name of SEGGER Microcontroller GmbH * -// * nor the names of its contributors may be used to endorse or * -// * promote products derived from this software without specific * -// * prior written permission. * -// * * -// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -// * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -// * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -// * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -// * DISCLAIMED. * -// * IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -// * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -// * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -// * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -// * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -// * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -// * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -// * DAMAGE. * -// * * -// ********************************************************************** -// -// -// Preprocessor Definitions -// ------------------------ -// APP_ENTRY_POINT -// -// Defines the application entry point function, if undefined this setting -// defaults to "main". -// -// INITIALIZE_STACK -// -// If defined, the contents of the stack will be initialized to a the -// value 0xCC. -// -// INITIALIZE_SECONDARY_SECTIONS -// -// If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized. -// -// INITIALIZE_TCM_SECTIONS -// -// If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections -// will be initialized. -// -// INITIALIZE_USER_SECTIONS -// -// If defined, the function InitializeUserMemorySections will be called prior -// to entering main in order to allow the user to initialize any user defined -// memory sections. -// -// FULL_LIBRARY -// -// If defined then -// - argc, argv are setup by the debug_getargs. -// - the exit symbol is defined and executes on return from main. -// - the exit symbol calls destructors, atexit functions and then debug_exit. -// -// If not defined then -// - argc and argv are zero. -// - the exit symbol is defined, executes on return from main and loops -// - -#ifndef APP_ENTRY_POINT -#define APP_ENTRY_POINT main -#endif - -#ifndef ARGSSPACE -#define ARGSSPACE 128 -#endif - .syntax unified - - .global _start - .extern APP_ENTRY_POINT - .global exit - .weak exit - -#ifdef INITIALIZE_USER_SECTIONS - .extern InitializeUserMemorySections -#endif - - .section .init, "ax" - .code 16 - .balign 2 - .thumb_func - -_start: - /* Set up main stack if size > 0 */ - ldr r1, =__stack_end__ - ldr r0, =__stack_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - mov sp, r1 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - ldr r0, =__stack_start__ - bl memory_set -#endif -1: - - /* Set up process stack if size > 0 */ - ldr r1, =__stack_process_end__ - ldr r0, =__stack_process_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - msr psp, r1 - movs r2, #2 - msr control, r2 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - bl memory_set -#endif -1: - - /* Copy initialized memory sections into RAM (if necessary). */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl memory_copy - ldr r0, =__tdata_load_start__ - ldr r1, =__tdata_start__ - ldr r2, =__tdata_end__ - bl memory_copy -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__data2_load_start__ - ldr r1, =__data2_start__ - ldr r2, =__data2_end__ - bl memory_copy - ldr r0, =__text2_load_start__ - ldr r1, =__text2_start__ - ldr r2, =__text2_end__ - bl memory_copy - ldr r0, =__rodata2_load_start__ - ldr r1, =__rodata2_start__ - ldr r2, =__rodata2_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__data_tcm_load_start__ - ldr r1, =__data_tcm_start__ - ldr r2, =__data_tcm_end__ - bl memory_copy - ldr r0, =__text_tcm_load_start__ - ldr r1, =__text_tcm_start__ - ldr r2, =__text_tcm_end__ - bl memory_copy - ldr r0, =__rodata_tcm_load_start__ - ldr r1, =__rodata_tcm_start__ - ldr r2, =__rodata_tcm_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Zero the bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - movs r2, #0 - bl memory_set - ldr r0, =__tbss_start__ - ldr r1, =__tbss_end__ - movs r2, #0 - bl memory_set -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__bss2_start__ - ldr r1, =__bss2_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__bss_tcm_start__ - ldr r1, =__bss_tcm_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Initialize the heap */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - subs r1, r1, r0 - cmp r1, #8 - blt 1f - movs r2, #0 - str r2, [r0] - adds r0, r0, #4 - str r1, [r0] -1: - -#ifdef INITIALIZE_USER_SECTIONS - ldr r2, =InitializeUserMemorySections - blx r2 -#endif - - /* Call constructors */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -ctor_loop: - cmp r0, r1 - beq ctor_end - ldr r2, [r0] - adds r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b ctor_loop -ctor_end: - - /* Setup initial call frame */ - movs r0, #0 - mov lr, r0 - mov r12, sp - - .type start, function -start: - /* Jump to application entry point */ -#ifdef FULL_LIBRARY - movs r0, #ARGSSPACE - ldr r1, =args - ldr r2, =debug_getargs - blx r2 - ldr r1, =args -#else - movs r0, #0 - movs r1, #0 -#endif - ldr r2, =APP_ENTRY_POINT - blx r2 - - .thumb_func -exit: -#ifdef FULL_LIBRARY - mov r5, r0 // save the exit parameter/return result - - /* Call destructors */ - ldr r0, =__dtors_start__ - ldr r1, =__dtors_end__ -dtor_loop: - cmp r0, r1 - beq dtor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b dtor_loop -dtor_end: - - /* Call atexit functions */ - ldr r2, =_execute_at_exit_fns - blx r2 - - /* Call debug_exit with return result/exit parameter */ - mov r0, r5 - ldr r2, =debug_exit - blx r2 -#endif - - /* Returned from application entry point, loop forever. */ -exit_loop: - b exit_loop - - .thumb_func -memory_copy: - cmp r0, r1 - beq 2f - subs r2, r2, r1 - beq 2f -1: - ldrb r3, [r0] - adds r0, r0, #1 - strb r3, [r1] - adds r1, r1, #1 - subs r2, r2, #1 - bne 1b -2: - bx lr - - .thumb_func -memory_set: - cmp r0, r1 - beq 1f - strb r2, [r0] - adds r0, r0, #1 - b memory_set -1: - bx lr - - // default C/C++ library helpers - -.macro HELPER helper_name - .section .text.\helper_name, "ax", %progbits - .balign 2 - .global \helper_name - .weak \helper_name -\helper_name: - .thumb_func -.endm - -.macro JUMPTO name -#if defined(__thumb__) && !defined(__thumb2__) - mov r12, r0 - ldr r0, =\name - push {r0} - mov r0, r12 - pop {pc} -#else - b \name -#endif -.endm - -HELPER __aeabi_read_tp - ldr r0, =__tbss_start__-8 - bx lr -HELPER abort - b . -HELPER __assert - b . -HELPER __aeabi_assert - b . -HELPER __sync_synchronize - bx lr -HELPER __getchar - JUMPTO debug_getchar -HELPER __putchar - JUMPTO debug_putchar -HELPER __open - JUMPTO debug_fopen -HELPER __close - JUMPTO debug_fclose -HELPER __write - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fwrite -HELPER __read - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fread -HELPER __seek - push {r4, lr} - mov r4, r0 - bl debug_fseek - cmp r0, #0 - bne 1f - mov r0, r4 - bl debug_ftell - pop {r4, pc} -1: - ldr r0, =-1 - pop {r4, pc} - // char __user_locale_name_buffer[]; - .section .bss.__user_locale_name_buffer, "aw", %nobits - .global __user_locale_name_buffer - .weak __user_locale_name_buffer - __user_locale_name_buffer: - .word 0x0 - -#ifdef FULL_LIBRARY - .bss -args: - .space ARGSSPACE -#endif - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - diff --git a/examples/host/cdc_msc_hid/ses/lpc18xx/LPC1800_Startup.s b/examples/host/cdc_msc_hid/ses/lpc18xx/LPC1800_Startup.s deleted file mode 100644 index e17b6050..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc18xx/LPC1800_Startup.s +++ /dev/null @@ -1,110 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * NO_STACK_INIT * - * * - * If defined, the stack pointer will not be initialised. * - * * - * NO_SYSTEM_INIT * - * * - * If defined, the SystemInit() function will not be called. By default * - * SystemInit() is called after reset to enable the clocks and memories to * - * be initialised prior to any C startup initialisation. * - * * - * NO_VTOR_CONFIG * - * * - * If defined, the vector table offset register will not be configured. * - * * - * MEMORY_INIT * - * * - * If defined, the MemoryInit() function will be called. By default * - * MemoryInit() is called after SystemInit() to enable an external memory * - * controller. * - * * - * STACK_INIT_VAL * - * * - * If defined, specifies the initial stack pointer value. If undefined, * - * the stack pointer will be initialised to point to the end of the * - * RAM segment. * - * * - * VECTORS_IN_RAM * - * * - * If defined, the exception vectors will be copied from Flash to RAM. * - * * - *****************************************************************************/ - - .syntax unified - - .global Reset_Handler - .extern _vectors - - .section .init, "ax" - .thumb_func - - .equ VTOR_REG, 0xE000ED08 - -#ifndef STACK_INIT_VAL -#define STACK_INIT_VAL __RAM_segment_end__ -#endif - -Reset_Handler: -#ifndef NO_STACK_INIT - /* Initialise main stack */ - ldr r0, =STACK_INIT_VAL - bic r0, #0x7 - mov sp, r0 -#endif - -#ifndef NO_SYSTEM_INIT - /* Initialise system */ - ldr r0, =SystemInit - blx r0 -#endif - -#ifdef MEMORY_INIT - ldr r0, =MemoryInit - blx r0 -#endif - -#ifdef VECTORS_IN_RAM - /* Copy exception vectors into RAM */ - ldr r0, =__vectors_start__ - ldr r1, =__vectors_end__ - ldr r2, =__vectors_ram_start__ -1: - cmp r0, r1 - beq 2f - ldr r3, [r0] - str r3, [r2] - adds r0, r0, #4 - adds r2, r2, #4 - b 1b -2: -#endif - -#ifndef NO_VTOR_CONFIG - /* Configure vector table offset register */ - ldr r0, =VTOR_REG -#ifdef VECTORS_IN_RAM - ldr r1, =_vectors_ram -#else - ldr r1, =_vectors -#endif - str r1, [r0] -#endif - - /* Jump to program start */ - b _start - - diff --git a/examples/host/cdc_msc_hid/ses/lpc18xx/LPC1800_Target.js b/examples/host/cdc_msc_hid/ses/lpc18xx/LPC1800_Target.js deleted file mode 100644 index 20560af4..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc18xx/LPC1800_Target.js +++ /dev/null @@ -1,19 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -function Reset() { - TargetInterface.resetAndStop(); -} - -function EnableTrace(traceInterfaceType) { - // TODO: Enable trace -} - diff --git a/examples/host/cdc_msc_hid/ses/lpc18xx/LPC1857_MemoryMap.xml b/examples/host/cdc_msc_hid/ses/lpc18xx/LPC1857_MemoryMap.xml deleted file mode 100644 index 4ded8a9f..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc18xx/LPC1857_MemoryMap.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/examples/host/cdc_msc_hid/ses/lpc18xx/LPC18xx_Registers.xml b/examples/host/cdc_msc_hid/ses/lpc18xx/LPC18xx_Registers.xml deleted file mode 100644 index 5e68d4c0..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc18xx/LPC18xx_Registers.xml +++ /dev/null @@ -1,30452 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/host/cdc_msc_hid/ses/lpc18xx/LPC18xx_Vectors.s b/examples/host/cdc_msc_hid/ses/lpc18xx/LPC18xx_Vectors.s deleted file mode 100644 index 8f9a39e4..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc18xx/LPC18xx_Vectors.s +++ /dev/null @@ -1,516 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * VECTORS_IN_RAM * - * * - * If defined, an area of RAM will large enough to store the vector table * - * will be reserved. * - * * - *****************************************************************************/ - - .syntax unified - .code 16 - - .section .init, "ax" - .align 0 - -/***************************************************************************** - * Default Exception Handlers * - *****************************************************************************/ - - .thumb_func - .weak NMI_Handler -NMI_Handler: - b . - - .thumb_func - .weak HardFault_Handler -HardFault_Handler: - b . - - .thumb_func - .weak SVC_Handler -SVC_Handler: - b . - - .thumb_func - .weak PendSV_Handler -PendSV_Handler: - b . - - .thumb_func - .weak SysTick_Handler -SysTick_Handler: - b . - - .thumb_func -Dummy_Handler: - b . - -#if defined(__OPTIMIZATION_SMALL) - - .weak DAC_IRQHandler - .thumb_set DAC_IRQHandler,Dummy_Handler - - .weak DMA_IRQHandler - .thumb_set DMA_IRQHandler,Dummy_Handler - - .weak FLASH_IRQHandler - .thumb_set FLASH_IRQHandler,Dummy_Handler - - .weak ETHERNET_IRQHandler - .thumb_set ETHERNET_IRQHandler,Dummy_Handler - - .weak SDIO_IRQHandler - .thumb_set SDIO_IRQHandler,Dummy_Handler - - .weak LCD_IRQHandler - .thumb_set LCD_IRQHandler,Dummy_Handler - - .weak USB0_IRQHandler - .thumb_set USB0_IRQHandler,Dummy_Handler - - .weak USB1_IRQHandler - .thumb_set USB1_IRQHandler,Dummy_Handler - - .weak SCT_IRQHandler - .thumb_set SCT_IRQHandler,Dummy_Handler - - .weak RITIMER_IRQHandler - .thumb_set RITIMER_IRQHandler,Dummy_Handler - - .weak TIMER0_IRQHandler - .thumb_set TIMER0_IRQHandler,Dummy_Handler - - .weak TIMER1_IRQHandler - .thumb_set TIMER1_IRQHandler,Dummy_Handler - - .weak TIMER2_IRQHandler - .thumb_set TIMER2_IRQHandler,Dummy_Handler - - .weak TIMER3_IRQHandler - .thumb_set TIMER3_IRQHandler,Dummy_Handler - - .weak MCPWM_IRQHandler - .thumb_set MCPWM_IRQHandler,Dummy_Handler - - .weak ADC0_IRQHandler - .thumb_set ADC0_IRQHandler,Dummy_Handler - - .weak I2C0_IRQHandler - .thumb_set I2C0_IRQHandler,Dummy_Handler - - .weak I2C1_IRQHandler - .thumb_set I2C1_IRQHandler,Dummy_Handler - - .weak ADC1_IRQHandler - .thumb_set ADC1_IRQHandler,Dummy_Handler - - .weak SSP0_IRQHandler - .thumb_set SSP0_IRQHandler,Dummy_Handler - - .weak SSP1_IRQHandler - .thumb_set SSP1_IRQHandler,Dummy_Handler - - .weak USART0_IRQHandler - .thumb_set USART0_IRQHandler,Dummy_Handler - - .weak UART1_IRQHandler - .thumb_set UART1_IRQHandler,Dummy_Handler - - .weak USART2_IRQHandler - .thumb_set USART2_IRQHandler,Dummy_Handler - - .weak USART3_IRQHandler - .thumb_set USART3_IRQHandler,Dummy_Handler - - .weak I2S0_IRQHandler - .thumb_set I2S0_IRQHandler,Dummy_Handler - - .weak I2S1_IRQHandler - .thumb_set I2S1_IRQHandler,Dummy_Handler - - .weak SPIFI_IRQHandler - .thumb_set SPIFI_IRQHandler,Dummy_Handler - - .weak PIN_INT0_IRQHandler - .thumb_set PIN_INT0_IRQHandler,Dummy_Handler - - .weak PIN_INT1_IRQHandler - .thumb_set PIN_INT1_IRQHandler,Dummy_Handler - - .weak PIN_INT2_IRQHandler - .thumb_set PIN_INT2_IRQHandler,Dummy_Handler - - .weak PIN_INT3_IRQHandler - .thumb_set PIN_INT3_IRQHandler,Dummy_Handler - - .weak PIN_INT4_IRQHandler - .thumb_set PIN_INT4_IRQHandler,Dummy_Handler - - .weak PIN_INT5_IRQHandler - .thumb_set PIN_INT5_IRQHandler,Dummy_Handler - - .weak PIN_INT6_IRQHandler - .thumb_set PIN_INT6_IRQHandler,Dummy_Handler - - .weak PIN_INT7_IRQHandler - .thumb_set PIN_INT7_IRQHandler,Dummy_Handler - - .weak GINT0_IRQHandler - .thumb_set GINT0_IRQHandler,Dummy_Handler - - .weak GINT1_IRQHandler - .thumb_set GINT1_IRQHandler,Dummy_Handler - - .weak EVENTROUTER_IRQHandler - .thumb_set EVENTROUTER_IRQHandler,Dummy_Handler - - .weak C_CAN1_IRQHandler - .thumb_set C_CAN1_IRQHandler,Dummy_Handler - - .weak ATIMER_IRQHandler - .thumb_set ATIMER_IRQHandler,Dummy_Handler - - .weak RTC_IRQHandler - .thumb_set RTC_IRQHandler,Dummy_Handler - - .weak WWDT_IRQHandler - .thumb_set WWDT_IRQHandler,Dummy_Handler - - .weak C_CAN0_IRQHandler - .thumb_set C_CAN0_IRQHandler,Dummy_Handler - - .weak QEI_IRQHandler - .thumb_set QEI_IRQHandler,Dummy_Handler - -#else - - .thumb_func - .weak DAC_IRQHandler -DAC_IRQHandler: - b . - - .thumb_func - .weak DMA_IRQHandler -DMA_IRQHandler: - b . - - .thumb_func - .weak FLASH_IRQHandler -FLASH_IRQHandler: - b . - - .thumb_func - .weak ETHERNET_IRQHandler -ETHERNET_IRQHandler: - b . - - .thumb_func - .weak SDIO_IRQHandler -SDIO_IRQHandler: - b . - - .thumb_func - .weak LCD_IRQHandler -LCD_IRQHandler: - b . - - .thumb_func - .weak USB0_IRQHandler -USB0_IRQHandler: - b . - - .thumb_func - .weak USB1_IRQHandler -USB1_IRQHandler: - b . - - .thumb_func - .weak SCT_IRQHandler -SCT_IRQHandler: - b . - - .thumb_func - .weak RITIMER_IRQHandler -RITIMER_IRQHandler: - b . - - .thumb_func - .weak TIMER0_IRQHandler -TIMER0_IRQHandler: - b . - - .thumb_func - .weak TIMER1_IRQHandler -TIMER1_IRQHandler: - b . - - .thumb_func - .weak TIMER2_IRQHandler -TIMER2_IRQHandler: - b . - - .thumb_func - .weak TIMER3_IRQHandler -TIMER3_IRQHandler: - b . - - .thumb_func - .weak MCPWM_IRQHandler -MCPWM_IRQHandler: - b . - - .thumb_func - .weak ADC0_IRQHandler -ADC0_IRQHandler: - b . - - .thumb_func - .weak I2C0_IRQHandler -I2C0_IRQHandler: - b . - - .thumb_func - .weak I2C1_IRQHandler -I2C1_IRQHandler: - b . - - .thumb_func - .weak ADC1_IRQHandler -ADC1_IRQHandler: - b . - - .thumb_func - .weak SSP0_IRQHandler -SSP0_IRQHandler: - b . - - .thumb_func - .weak SSP1_IRQHandler -SSP1_IRQHandler: - b . - - .thumb_func - .weak USART0_IRQHandler -USART0_IRQHandler: - b . - - .thumb_func - .weak UART1_IRQHandler -UART1_IRQHandler: - b . - - .thumb_func - .weak USART2_IRQHandler -USART2_IRQHandler: - b . - - .thumb_func - .weak USART3_IRQHandler -USART3_IRQHandler: - b . - - .thumb_func - .weak I2S0_IRQHandler -I2S0_IRQHandler: - b . - - .thumb_func - .weak I2S1_IRQHandler -I2S1_IRQHandler: - b . - - .thumb_func - .weak SPIFI_IRQHandler -SPIFI_IRQHandler: - b . - - .thumb_func - .weak PIN_INT0_IRQHandler -PIN_INT0_IRQHandler: - b . - - .thumb_func - .weak PIN_INT1_IRQHandler -PIN_INT1_IRQHandler: - b . - - .thumb_func - .weak PIN_INT2_IRQHandler -PIN_INT2_IRQHandler: - b . - - .thumb_func - .weak PIN_INT3_IRQHandler -PIN_INT3_IRQHandler: - b . - - .thumb_func - .weak PIN_INT4_IRQHandler -PIN_INT4_IRQHandler: - b . - - .thumb_func - .weak PIN_INT5_IRQHandler -PIN_INT5_IRQHandler: - b . - - .thumb_func - .weak PIN_INT6_IRQHandler -PIN_INT6_IRQHandler: - b . - - .thumb_func - .weak PIN_INT7_IRQHandler -PIN_INT7_IRQHandler: - b . - - .thumb_func - .weak GINT0_IRQHandler -GINT0_IRQHandler: - b . - - .thumb_func - .weak GINT1_IRQHandler -GINT1_IRQHandler: - b . - - .thumb_func - .weak EVENTROUTER_IRQHandler -EVENTROUTER_IRQHandler: - b . - - .thumb_func - .weak C_CAN1_IRQHandler -C_CAN1_IRQHandler: - b . - - .thumb_func - .weak ATIMER_IRQHandler -ATIMER_IRQHandler: - b . - - .thumb_func - .weak RTC_IRQHandler -RTC_IRQHandler: - b . - - .thumb_func - .weak WWDT_IRQHandler -WWDT_IRQHandler: - b . - - .thumb_func - .weak C_CAN0_IRQHandler -C_CAN0_IRQHandler: - b . - - .thumb_func - .weak QEI_IRQHandler -QEI_IRQHandler: - b . - -#endif - -/***************************************************************************** - * Vector Table * - *****************************************************************************/ - - .section .vectors, "ax" - .align 0 - .global _vectors - .extern __stack_end__ - .extern Reset_Handler - -_vectors: - .word __stack_end__ - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word SVC_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word PendSV_Handler - .word SysTick_Handler - .word DAC_IRQHandler - .word Dummy_Handler /* Reserved */ - .word DMA_IRQHandler - .word Dummy_Handler /* Reserved */ - .word FLASH_IRQHandler - .word ETHERNET_IRQHandler - .word SDIO_IRQHandler - .word LCD_IRQHandler - .word USB0_IRQHandler - .word USB1_IRQHandler - .word SCT_IRQHandler - .word RITIMER_IRQHandler - .word TIMER0_IRQHandler - .word TIMER1_IRQHandler - .word TIMER2_IRQHandler - .word TIMER3_IRQHandler - .word MCPWM_IRQHandler - .word ADC0_IRQHandler - .word I2C0_IRQHandler - .word I2C1_IRQHandler - .word Dummy_Handler /* Reserved */ - .word ADC1_IRQHandler - .word SSP0_IRQHandler - .word SSP1_IRQHandler - .word USART0_IRQHandler - .word UART1_IRQHandler - .word USART2_IRQHandler - .word USART3_IRQHandler - .word I2S0_IRQHandler - .word I2S1_IRQHandler - .word SPIFI_IRQHandler - .word Dummy_Handler /* Reserved */ - .word PIN_INT0_IRQHandler - .word PIN_INT1_IRQHandler - .word PIN_INT2_IRQHandler - .word PIN_INT3_IRQHandler - .word PIN_INT4_IRQHandler - .word PIN_INT5_IRQHandler - .word PIN_INT6_IRQHandler - .word PIN_INT7_IRQHandler - .word GINT0_IRQHandler - .word GINT1_IRQHandler - .word EVENTROUTER_IRQHandler - .word C_CAN1_IRQHandler - .word Dummy_Handler /* Reserved */ - .word Dummy_Handler /* Reserved */ - .word ATIMER_IRQHandler - .word RTC_IRQHandler - .word Dummy_Handler /* Reserved */ - .word WWDT_IRQHandler - .word Dummy_Handler /* Reserved */ - .word C_CAN0_IRQHandler - .word QEI_IRQHandler -_vectors_end: - -#ifdef VECTORS_IN_RAM - .section .vectors_ram, "ax" - .align 0 - .global _vectors_ram - -_vectors_ram: - .space _vectors_end - _vectors, 0 -#endif diff --git a/examples/host/cdc_msc_hid/ses/lpc18xx/flash_placement.xml b/examples/host/cdc_msc_hid/ses/lpc18xx/flash_placement.xml deleted file mode 100644 index 79bedc53..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc18xx/flash_placement.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/host/cdc_msc_hid/ses/lpc18xx/lpc18xx.emProject b/examples/host/cdc_msc_hid/ses/lpc18xx/lpc18xx.emProject deleted file mode 100644 index 271076b5..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc18xx/lpc18xx.emProject +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/host/cdc_msc_hid/ses/lpc18xx/thumb_crt0.s b/examples/host/cdc_msc_hid/ses/lpc18xx/thumb_crt0.s deleted file mode 100644 index 17f88e0c..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc18xx/thumb_crt0.s +++ /dev/null @@ -1,415 +0,0 @@ -// ********************************************************************** -// * SEGGER Microcontroller GmbH * -// * The Embedded Experts * -// ********************************************************************** -// * * -// * (c) 2014 - 2018 SEGGER Microcontroller GmbH * -// * (c) 2001 - 2018 Rowley Associates Limited * -// * * -// * www.segger.com Support: support@segger.com * -// * * -// ********************************************************************** -// * * -// * All rights reserved. * -// * * -// * Redistribution and use in source and binary forms, with or * -// * without modification, are permitted provided that the following * -// * conditions are met: * -// * * -// * - Redistributions of source code must retain the above copyright * -// * notice, this list of conditions and the following disclaimer. * -// * * -// * - Neither the name of SEGGER Microcontroller GmbH * -// * nor the names of its contributors may be used to endorse or * -// * promote products derived from this software without specific * -// * prior written permission. * -// * * -// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -// * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -// * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -// * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -// * DISCLAIMED. * -// * IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -// * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -// * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -// * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -// * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -// * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -// * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -// * DAMAGE. * -// * * -// ********************************************************************** -// -// -// Preprocessor Definitions -// ------------------------ -// APP_ENTRY_POINT -// -// Defines the application entry point function, if undefined this setting -// defaults to "main". -// -// INITIALIZE_STACK -// -// If defined, the contents of the stack will be initialized to a the -// value 0xCC. -// -// INITIALIZE_SECONDARY_SECTIONS -// -// If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized. -// -// INITIALIZE_TCM_SECTIONS -// -// If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections -// will be initialized. -// -// INITIALIZE_USER_SECTIONS -// -// If defined, the function InitializeUserMemorySections will be called prior -// to entering main in order to allow the user to initialize any user defined -// memory sections. -// -// FULL_LIBRARY -// -// If defined then -// - argc, argv are setup by the debug_getargs. -// - the exit symbol is defined and executes on return from main. -// - the exit symbol calls destructors, atexit functions and then debug_exit. -// -// If not defined then -// - argc and argv are zero. -// - the exit symbol is defined, executes on return from main and loops -// - -#ifndef APP_ENTRY_POINT -#define APP_ENTRY_POINT main -#endif - -#ifndef ARGSSPACE -#define ARGSSPACE 128 -#endif - .syntax unified - - .global _start - .extern APP_ENTRY_POINT - .global exit - .weak exit - -#ifdef INITIALIZE_USER_SECTIONS - .extern InitializeUserMemorySections -#endif - - .section .init, "ax" - .code 16 - .balign 2 - .thumb_func - -_start: - /* Set up main stack if size > 0 */ - ldr r1, =__stack_end__ - ldr r0, =__stack_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - mov sp, r1 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - ldr r0, =__stack_start__ - bl memory_set -#endif -1: - - /* Set up process stack if size > 0 */ - ldr r1, =__stack_process_end__ - ldr r0, =__stack_process_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - msr psp, r1 - movs r2, #2 - msr control, r2 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - bl memory_set -#endif -1: - - /* Copy initialized memory sections into RAM (if necessary). */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl memory_copy - ldr r0, =__tdata_load_start__ - ldr r1, =__tdata_start__ - ldr r2, =__tdata_end__ - bl memory_copy -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__data2_load_start__ - ldr r1, =__data2_start__ - ldr r2, =__data2_end__ - bl memory_copy - ldr r0, =__text2_load_start__ - ldr r1, =__text2_start__ - ldr r2, =__text2_end__ - bl memory_copy - ldr r0, =__rodata2_load_start__ - ldr r1, =__rodata2_start__ - ldr r2, =__rodata2_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__data_tcm_load_start__ - ldr r1, =__data_tcm_start__ - ldr r2, =__data_tcm_end__ - bl memory_copy - ldr r0, =__text_tcm_load_start__ - ldr r1, =__text_tcm_start__ - ldr r2, =__text_tcm_end__ - bl memory_copy - ldr r0, =__rodata_tcm_load_start__ - ldr r1, =__rodata_tcm_start__ - ldr r2, =__rodata_tcm_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Zero the bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - movs r2, #0 - bl memory_set - ldr r0, =__tbss_start__ - ldr r1, =__tbss_end__ - movs r2, #0 - bl memory_set -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__bss2_start__ - ldr r1, =__bss2_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__bss_tcm_start__ - ldr r1, =__bss_tcm_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Initialize the heap */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - subs r1, r1, r0 - cmp r1, #8 - blt 1f - movs r2, #0 - str r2, [r0] - adds r0, r0, #4 - str r1, [r0] -1: - -#ifdef INITIALIZE_USER_SECTIONS - ldr r2, =InitializeUserMemorySections - blx r2 -#endif - - /* Call constructors */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -ctor_loop: - cmp r0, r1 - beq ctor_end - ldr r2, [r0] - adds r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b ctor_loop -ctor_end: - - /* Setup initial call frame */ - movs r0, #0 - mov lr, r0 - mov r12, sp - - .type start, function -start: - /* Jump to application entry point */ -#ifdef FULL_LIBRARY - movs r0, #ARGSSPACE - ldr r1, =args - ldr r2, =debug_getargs - blx r2 - ldr r1, =args -#else - movs r0, #0 - movs r1, #0 -#endif - ldr r2, =APP_ENTRY_POINT - blx r2 - - .thumb_func -exit: -#ifdef FULL_LIBRARY - mov r5, r0 // save the exit parameter/return result - - /* Call destructors */ - ldr r0, =__dtors_start__ - ldr r1, =__dtors_end__ -dtor_loop: - cmp r0, r1 - beq dtor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b dtor_loop -dtor_end: - - /* Call atexit functions */ - ldr r2, =_execute_at_exit_fns - blx r2 - - /* Call debug_exit with return result/exit parameter */ - mov r0, r5 - ldr r2, =debug_exit - blx r2 -#endif - - /* Returned from application entry point, loop forever. */ -exit_loop: - b exit_loop - - .thumb_func -memory_copy: - cmp r0, r1 - beq 2f - subs r2, r2, r1 - beq 2f -1: - ldrb r3, [r0] - adds r0, r0, #1 - strb r3, [r1] - adds r1, r1, #1 - subs r2, r2, #1 - bne 1b -2: - bx lr - - .thumb_func -memory_set: - cmp r0, r1 - beq 1f - strb r2, [r0] - adds r0, r0, #1 - b memory_set -1: - bx lr - - // default C/C++ library helpers - -.macro HELPER helper_name - .section .text.\helper_name, "ax", %progbits - .balign 2 - .global \helper_name - .weak \helper_name -\helper_name: - .thumb_func -.endm - -.macro JUMPTO name -#if defined(__thumb__) && !defined(__thumb2__) - mov r12, r0 - ldr r0, =\name - push {r0} - mov r0, r12 - pop {pc} -#else - b \name -#endif -.endm - -HELPER __aeabi_read_tp - ldr r0, =__tbss_start__-8 - bx lr -HELPER abort - b . -HELPER __assert - b . -HELPER __aeabi_assert - b . -HELPER __sync_synchronize - bx lr -HELPER __getchar - JUMPTO debug_getchar -HELPER __putchar - JUMPTO debug_putchar -HELPER __open - JUMPTO debug_fopen -HELPER __close - JUMPTO debug_fclose -HELPER __write - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fwrite -HELPER __read - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fread -HELPER __seek - push {r4, lr} - mov r4, r0 - bl debug_fseek - cmp r0, #0 - bne 1f - mov r0, r4 - bl debug_ftell - pop {r4, pc} -1: - ldr r0, =-1 - pop {r4, pc} - // char __user_locale_name_buffer[]; - .section .bss.__user_locale_name_buffer, "aw", %nobits - .global __user_locale_name_buffer - .weak __user_locale_name_buffer - __user_locale_name_buffer: - .word 0x0 - -#ifdef FULL_LIBRARY - .bss -args: - .space ARGSSPACE -#endif - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - diff --git a/examples/host/cdc_msc_hid/ses/lpc40xx/LPC4000_Startup.s b/examples/host/cdc_msc_hid/ses/lpc40xx/LPC4000_Startup.s deleted file mode 100644 index 03bf54de..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc40xx/LPC4000_Startup.s +++ /dev/null @@ -1,128 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * NO_FPU_ENABLE * - * * - * If defined, FPU will not be enabled. * - * * - * NO_STACK_INIT * - * * - * If defined, the stack pointer will not be initialised. * - * * - * NO_SYSTEM_INIT * - * * - * If defined, the SystemInit() function will not be called. By default * - * SystemInit() is called after reset to enable the clocks and memories to * - * be initialised prior to any C startup initialisation. * - * * - * NO_VTOR_CONFIG * - * * - * If defined, the vector table offset register will not be configured. * - * * - * MEMORY_INIT * - * * - * If defined, the MemoryInit() function will be called. By default * - * MemoryInit() is called after SystemInit() to enable an external memory * - * controller. * - * * - * STACK_INIT_VAL * - * * - * If defined, specifies the initial stack pointer value. If undefined, * - * the stack pointer will be initialised to point to the end of the * - * RAM segment. * - * * - * VECTORS_IN_RAM * - * * - * If defined, the exception vectors will be copied from Flash to RAM. * - * * - *****************************************************************************/ - - .syntax unified - - .global Reset_Handler - .extern _vectors - - .section .init, "ax" - .thumb_func - - .equ VTOR_REG, 0xE000ED08 - .equ FPU_CPACR_REG, 0xE000ED88 - -#ifndef STACK_INIT_VAL -#define STACK_INIT_VAL __RAM_segment_end__ -#endif - -Reset_Handler: -#ifndef NO_STACK_INIT - /* Initialise main stack */ - ldr r0, =STACK_INIT_VAL - bic r0, #0x7 - mov sp, r0 -#endif - -#ifndef NO_SYSTEM_INIT - /* Initialise system */ - ldr r0, =SystemInit - blx r0 - .pushsection .init_array, "aw", %init_array - .word SystemCoreClockUpdate - .popsection -#endif - -#ifdef MEMORY_INIT - ldr r0, =MemoryInit - blx r0 -#endif - -#ifdef VECTORS_IN_RAM - /* Copy exception vectors into RAM */ - ldr r0, =__vectors_start__ - ldr r1, =__vectors_end__ - ldr r2, =__vectors_ram_start__ -1: - cmp r0, r1 - beq 2f - ldr r3, [r0] - str r3, [r2] - adds r0, r0, #4 - adds r2, r2, #4 - b 1b -2: -#endif - -#ifndef NO_VTOR_CONFIG - /* Configure vector table offset register */ - ldr r0, =VTOR_REG -#ifdef VECTORS_IN_RAM - ldr r1, =_vectors_ram -#else - ldr r1, =_vectors -#endif - str r1, [r0] -#endif - -#if (defined(__ARM_ARCH_FPV4_SP_D16__) || defined(__ARM_ARCH_FPV5_D16__)) && !defined(NO_FPU_ENABLE) - /* Enable FPU */ - ldr r0, =FPU_CPACR_REG - ldr r1, [r0] - orr r1, r1, #(0xF << 20) - str r1, [r0] - dsb - isb -#endif - - /* Jump to program start */ - b _start - - diff --git a/examples/host/cdc_msc_hid/ses/lpc40xx/LPC4000_Target.js b/examples/host/cdc_msc_hid/ses/lpc40xx/LPC4000_Target.js deleted file mode 100644 index 20560af4..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc40xx/LPC4000_Target.js +++ /dev/null @@ -1,19 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -function Reset() { - TargetInterface.resetAndStop(); -} - -function EnableTrace(traceInterfaceType) { - // TODO: Enable trace -} - diff --git a/examples/host/cdc_msc_hid/ses/lpc40xx/LPC4088FBD208_MemoryMap.xml b/examples/host/cdc_msc_hid/ses/lpc40xx/LPC4088FBD208_MemoryMap.xml deleted file mode 100644 index 9b8f2d9b..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc40xx/LPC4088FBD208_MemoryMap.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/examples/host/cdc_msc_hid/ses/lpc40xx/LPC408x_7x_Registers.xml b/examples/host/cdc_msc_hid/ses/lpc40xx/LPC408x_7x_Registers.xml deleted file mode 100644 index 4a4c0817..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc40xx/LPC408x_7x_Registers.xml +++ /dev/null @@ -1,18992 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/host/cdc_msc_hid/ses/lpc40xx/LPC408x_7x_Vectors.s b/examples/host/cdc_msc_hid/ses/lpc40xx/LPC408x_7x_Vectors.s deleted file mode 100644 index 02568546..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc40xx/LPC408x_7x_Vectors.s +++ /dev/null @@ -1,458 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * VECTORS_IN_RAM * - * * - * If defined, an area of RAM will large enough to store the vector table * - * will be reserved. * - * * - *****************************************************************************/ - - .syntax unified - .code 16 - - .section .init, "ax" - .align 0 - -/***************************************************************************** - * Default Exception Handlers * - *****************************************************************************/ - - .thumb_func - .weak NMI_Handler -NMI_Handler: - b . - - .thumb_func - .weak HardFault_Handler -HardFault_Handler: - b . - - .thumb_func - .weak SVC_Handler -SVC_Handler: - b . - - .thumb_func - .weak PendSV_Handler -PendSV_Handler: - b . - - .thumb_func - .weak SysTick_Handler -SysTick_Handler: - b . - - .thumb_func -Dummy_Handler: - b . - -#if defined(__OPTIMIZATION_SMALL) - - .weak WWDT_IRQHandler - .thumb_set WWDT_IRQHandler,Dummy_Handler - - .weak TIMER0_IRQHandler - .thumb_set TIMER0_IRQHandler,Dummy_Handler - - .weak TIMER1_IRQHandler - .thumb_set TIMER1_IRQHandler,Dummy_Handler - - .weak TIMER2_IRQHandler - .thumb_set TIMER2_IRQHandler,Dummy_Handler - - .weak TIMER3_IRQHandler - .thumb_set TIMER3_IRQHandler,Dummy_Handler - - .weak UART0_IRQHandler - .thumb_set UART0_IRQHandler,Dummy_Handler - - .weak UART1_IRQHandler - .thumb_set UART1_IRQHandler,Dummy_Handler - - .weak UART2_IRQHandler - .thumb_set UART2_IRQHandler,Dummy_Handler - - .weak UART3_IRQHandler - .thumb_set UART3_IRQHandler,Dummy_Handler - - .weak PWM1_IRQHandler - .thumb_set PWM1_IRQHandler,Dummy_Handler - - .weak I2C0_IRQHandler - .thumb_set I2C0_IRQHandler,Dummy_Handler - - .weak I2C1_IRQHandler - .thumb_set I2C1_IRQHandler,Dummy_Handler - - .weak I2C2_IRQHandler - .thumb_set I2C2_IRQHandler,Dummy_Handler - - .weak SSP0_IRQHandler - .thumb_set SSP0_IRQHandler,Dummy_Handler - - .weak SSP1_IRQHandler - .thumb_set SSP1_IRQHandler,Dummy_Handler - - .weak RTC_IRQHandler - .thumb_set RTC_IRQHandler,Dummy_Handler - - .weak EINT0_IRQHandler - .thumb_set EINT0_IRQHandler,Dummy_Handler - - .weak EINT1_IRQHandler - .thumb_set EINT1_IRQHandler,Dummy_Handler - - .weak EINT2_IRQHandler - .thumb_set EINT2_IRQHandler,Dummy_Handler - - .weak EINT3_IRQHandler - .thumb_set EINT3_IRQHandler,Dummy_Handler - - .weak ADC_IRQHandler - .thumb_set ADC_IRQHandler,Dummy_Handler - - .weak BOD_IRQHandler - .thumb_set BOD_IRQHandler,Dummy_Handler - - .weak USB_IRQHandler - .thumb_set USB_IRQHandler,Dummy_Handler - - .weak CAN_IRQHandler - .thumb_set CAN_IRQHandler,Dummy_Handler - - .weak GPDMA_IRQHandler - .thumb_set GPDMA_IRQHandler,Dummy_Handler - - .weak I2S_IRQHandler - .thumb_set I2S_IRQHandler,Dummy_Handler - - .weak ETHERNET_IRQHandler - .thumb_set ETHERNET_IRQHandler,Dummy_Handler - - .weak SDMMC_IRQHandler - .thumb_set SDMMC_IRQHandler,Dummy_Handler - - .weak MCPWM_IRQHandler - .thumb_set MCPWM_IRQHandler,Dummy_Handler - - .weak QEI_IRQHandler - .thumb_set QEI_IRQHandler,Dummy_Handler - - .weak USB_NEED_CLK_IRQHandler - .thumb_set USB_NEED_CLK_IRQHandler,Dummy_Handler - - .weak UART4_IRQHandler - .thumb_set UART4_IRQHandler,Dummy_Handler - - .weak SSP2_IRQHandler - .thumb_set SSP2_IRQHandler,Dummy_Handler - - .weak LCD_IRQHandler - .thumb_set LCD_IRQHandler,Dummy_Handler - - .weak GPIOINT_IRQHandler - .thumb_set GPIOINT_IRQHandler,Dummy_Handler - - .weak PWM0_IRQHandler - .thumb_set PWM0_IRQHandler,Dummy_Handler - - .weak EEPROM_IRQHandler - .thumb_set EEPROM_IRQHandler,Dummy_Handler - - .weak CMP0_IRQHandler - .thumb_set CMP0_IRQHandler,Dummy_Handler - - .weak CMP1_IRQHandler - .thumb_set CMP1_IRQHandler,Dummy_Handler - -#else - - .thumb_func - .weak WWDT_IRQHandler -WWDT_IRQHandler: - b . - - .thumb_func - .weak TIMER0_IRQHandler -TIMER0_IRQHandler: - b . - - .thumb_func - .weak TIMER1_IRQHandler -TIMER1_IRQHandler: - b . - - .thumb_func - .weak TIMER2_IRQHandler -TIMER2_IRQHandler: - b . - - .thumb_func - .weak TIMER3_IRQHandler -TIMER3_IRQHandler: - b . - - .thumb_func - .weak UART0_IRQHandler -UART0_IRQHandler: - b . - - .thumb_func - .weak UART1_IRQHandler -UART1_IRQHandler: - b . - - .thumb_func - .weak UART2_IRQHandler -UART2_IRQHandler: - b . - - .thumb_func - .weak UART3_IRQHandler -UART3_IRQHandler: - b . - - .thumb_func - .weak PWM1_IRQHandler -PWM1_IRQHandler: - b . - - .thumb_func - .weak I2C0_IRQHandler -I2C0_IRQHandler: - b . - - .thumb_func - .weak I2C1_IRQHandler -I2C1_IRQHandler: - b . - - .thumb_func - .weak I2C2_IRQHandler -I2C2_IRQHandler: - b . - - .thumb_func - .weak SSP0_IRQHandler -SSP0_IRQHandler: - b . - - .thumb_func - .weak SSP1_IRQHandler -SSP1_IRQHandler: - b . - - .thumb_func - .weak RTC_IRQHandler -RTC_IRQHandler: - b . - - .thumb_func - .weak EINT0_IRQHandler -EINT0_IRQHandler: - b . - - .thumb_func - .weak EINT1_IRQHandler -EINT1_IRQHandler: - b . - - .thumb_func - .weak EINT2_IRQHandler -EINT2_IRQHandler: - b . - - .thumb_func - .weak EINT3_IRQHandler -EINT3_IRQHandler: - b . - - .thumb_func - .weak ADC_IRQHandler -ADC_IRQHandler: - b . - - .thumb_func - .weak BOD_IRQHandler -BOD_IRQHandler: - b . - - .thumb_func - .weak USB_IRQHandler -USB_IRQHandler: - b . - - .thumb_func - .weak CAN_IRQHandler -CAN_IRQHandler: - b . - - .thumb_func - .weak GPDMA_IRQHandler -GPDMA_IRQHandler: - b . - - .thumb_func - .weak I2S_IRQHandler -I2S_IRQHandler: - b . - - .thumb_func - .weak ETHERNET_IRQHandler -ETHERNET_IRQHandler: - b . - - .thumb_func - .weak SDMMC_IRQHandler -SDMMC_IRQHandler: - b . - - .thumb_func - .weak MCPWM_IRQHandler -MCPWM_IRQHandler: - b . - - .thumb_func - .weak QEI_IRQHandler -QEI_IRQHandler: - b . - - .thumb_func - .weak USB_NEED_CLK_IRQHandler -USB_NEED_CLK_IRQHandler: - b . - - .thumb_func - .weak UART4_IRQHandler -UART4_IRQHandler: - b . - - .thumb_func - .weak SSP2_IRQHandler -SSP2_IRQHandler: - b . - - .thumb_func - .weak LCD_IRQHandler -LCD_IRQHandler: - b . - - .thumb_func - .weak GPIOINT_IRQHandler -GPIOINT_IRQHandler: - b . - - .thumb_func - .weak PWM0_IRQHandler -PWM0_IRQHandler: - b . - - .thumb_func - .weak EEPROM_IRQHandler -EEPROM_IRQHandler: - b . - - .thumb_func - .weak CMP0_IRQHandler -CMP0_IRQHandler: - b . - - .thumb_func - .weak CMP1_IRQHandler -CMP1_IRQHandler: - b . - -#endif - -/***************************************************************************** - * Vector Table * - *****************************************************************************/ - - .section .vectors, "ax" - .align 0 - .global _vectors - .extern __stack_end__ - .extern Reset_Handler - -_vectors: - .word __stack_end__ - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word SVC_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word PendSV_Handler - .word SysTick_Handler - .word WWDT_IRQHandler - .word TIMER0_IRQHandler - .word TIMER1_IRQHandler - .word TIMER2_IRQHandler - .word TIMER3_IRQHandler - .word UART0_IRQHandler - .word UART1_IRQHandler - .word UART2_IRQHandler - .word UART3_IRQHandler - .word PWM1_IRQHandler - .word I2C0_IRQHandler - .word I2C1_IRQHandler - .word I2C2_IRQHandler - .word Dummy_Handler /* Reserved */ - .word SSP0_IRQHandler - .word SSP1_IRQHandler - .word Dummy_Handler /* Reserved */ - .word RTC_IRQHandler - .word EINT0_IRQHandler - .word EINT1_IRQHandler - .word EINT2_IRQHandler - .word EINT3_IRQHandler - .word ADC_IRQHandler - .word BOD_IRQHandler - .word USB_IRQHandler - .word CAN_IRQHandler - .word GPDMA_IRQHandler - .word I2S_IRQHandler - .word ETHERNET_IRQHandler - .word SDMMC_IRQHandler - .word MCPWM_IRQHandler - .word QEI_IRQHandler - .word Dummy_Handler /* Reserved */ - .word USB_NEED_CLK_IRQHandler - .word Dummy_Handler /* Reserved */ - .word UART4_IRQHandler - .word SSP2_IRQHandler - .word LCD_IRQHandler - .word GPIOINT_IRQHandler - .word PWM0_IRQHandler - .word EEPROM_IRQHandler - .word CMP0_IRQHandler - .word CMP1_IRQHandler -_vectors_end: - -#ifdef VECTORS_IN_RAM - .section .vectors_ram, "ax" - .align 0 - .global _vectors_ram - -_vectors_ram: - .space _vectors_end - _vectors, 0 -#endif diff --git a/examples/host/cdc_msc_hid/ses/lpc40xx/flash_placement.xml b/examples/host/cdc_msc_hid/ses/lpc40xx/flash_placement.xml deleted file mode 100644 index 79bedc53..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc40xx/flash_placement.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/host/cdc_msc_hid/ses/lpc40xx/lpc40xx.emProject b/examples/host/cdc_msc_hid/ses/lpc40xx/lpc40xx.emProject deleted file mode 100644 index 68995f1a..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc40xx/lpc40xx.emProject +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/host/cdc_msc_hid/ses/lpc40xx/thumb_crt0.s b/examples/host/cdc_msc_hid/ses/lpc40xx/thumb_crt0.s deleted file mode 100644 index 17f88e0c..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc40xx/thumb_crt0.s +++ /dev/null @@ -1,415 +0,0 @@ -// ********************************************************************** -// * SEGGER Microcontroller GmbH * -// * The Embedded Experts * -// ********************************************************************** -// * * -// * (c) 2014 - 2018 SEGGER Microcontroller GmbH * -// * (c) 2001 - 2018 Rowley Associates Limited * -// * * -// * www.segger.com Support: support@segger.com * -// * * -// ********************************************************************** -// * * -// * All rights reserved. * -// * * -// * Redistribution and use in source and binary forms, with or * -// * without modification, are permitted provided that the following * -// * conditions are met: * -// * * -// * - Redistributions of source code must retain the above copyright * -// * notice, this list of conditions and the following disclaimer. * -// * * -// * - Neither the name of SEGGER Microcontroller GmbH * -// * nor the names of its contributors may be used to endorse or * -// * promote products derived from this software without specific * -// * prior written permission. * -// * * -// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -// * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -// * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -// * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -// * DISCLAIMED. * -// * IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -// * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -// * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -// * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -// * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -// * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -// * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -// * DAMAGE. * -// * * -// ********************************************************************** -// -// -// Preprocessor Definitions -// ------------------------ -// APP_ENTRY_POINT -// -// Defines the application entry point function, if undefined this setting -// defaults to "main". -// -// INITIALIZE_STACK -// -// If defined, the contents of the stack will be initialized to a the -// value 0xCC. -// -// INITIALIZE_SECONDARY_SECTIONS -// -// If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized. -// -// INITIALIZE_TCM_SECTIONS -// -// If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections -// will be initialized. -// -// INITIALIZE_USER_SECTIONS -// -// If defined, the function InitializeUserMemorySections will be called prior -// to entering main in order to allow the user to initialize any user defined -// memory sections. -// -// FULL_LIBRARY -// -// If defined then -// - argc, argv are setup by the debug_getargs. -// - the exit symbol is defined and executes on return from main. -// - the exit symbol calls destructors, atexit functions and then debug_exit. -// -// If not defined then -// - argc and argv are zero. -// - the exit symbol is defined, executes on return from main and loops -// - -#ifndef APP_ENTRY_POINT -#define APP_ENTRY_POINT main -#endif - -#ifndef ARGSSPACE -#define ARGSSPACE 128 -#endif - .syntax unified - - .global _start - .extern APP_ENTRY_POINT - .global exit - .weak exit - -#ifdef INITIALIZE_USER_SECTIONS - .extern InitializeUserMemorySections -#endif - - .section .init, "ax" - .code 16 - .balign 2 - .thumb_func - -_start: - /* Set up main stack if size > 0 */ - ldr r1, =__stack_end__ - ldr r0, =__stack_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - mov sp, r1 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - ldr r0, =__stack_start__ - bl memory_set -#endif -1: - - /* Set up process stack if size > 0 */ - ldr r1, =__stack_process_end__ - ldr r0, =__stack_process_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - msr psp, r1 - movs r2, #2 - msr control, r2 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - bl memory_set -#endif -1: - - /* Copy initialized memory sections into RAM (if necessary). */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl memory_copy - ldr r0, =__tdata_load_start__ - ldr r1, =__tdata_start__ - ldr r2, =__tdata_end__ - bl memory_copy -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__data2_load_start__ - ldr r1, =__data2_start__ - ldr r2, =__data2_end__ - bl memory_copy - ldr r0, =__text2_load_start__ - ldr r1, =__text2_start__ - ldr r2, =__text2_end__ - bl memory_copy - ldr r0, =__rodata2_load_start__ - ldr r1, =__rodata2_start__ - ldr r2, =__rodata2_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__data_tcm_load_start__ - ldr r1, =__data_tcm_start__ - ldr r2, =__data_tcm_end__ - bl memory_copy - ldr r0, =__text_tcm_load_start__ - ldr r1, =__text_tcm_start__ - ldr r2, =__text_tcm_end__ - bl memory_copy - ldr r0, =__rodata_tcm_load_start__ - ldr r1, =__rodata_tcm_start__ - ldr r2, =__rodata_tcm_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Zero the bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - movs r2, #0 - bl memory_set - ldr r0, =__tbss_start__ - ldr r1, =__tbss_end__ - movs r2, #0 - bl memory_set -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__bss2_start__ - ldr r1, =__bss2_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__bss_tcm_start__ - ldr r1, =__bss_tcm_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Initialize the heap */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - subs r1, r1, r0 - cmp r1, #8 - blt 1f - movs r2, #0 - str r2, [r0] - adds r0, r0, #4 - str r1, [r0] -1: - -#ifdef INITIALIZE_USER_SECTIONS - ldr r2, =InitializeUserMemorySections - blx r2 -#endif - - /* Call constructors */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -ctor_loop: - cmp r0, r1 - beq ctor_end - ldr r2, [r0] - adds r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b ctor_loop -ctor_end: - - /* Setup initial call frame */ - movs r0, #0 - mov lr, r0 - mov r12, sp - - .type start, function -start: - /* Jump to application entry point */ -#ifdef FULL_LIBRARY - movs r0, #ARGSSPACE - ldr r1, =args - ldr r2, =debug_getargs - blx r2 - ldr r1, =args -#else - movs r0, #0 - movs r1, #0 -#endif - ldr r2, =APP_ENTRY_POINT - blx r2 - - .thumb_func -exit: -#ifdef FULL_LIBRARY - mov r5, r0 // save the exit parameter/return result - - /* Call destructors */ - ldr r0, =__dtors_start__ - ldr r1, =__dtors_end__ -dtor_loop: - cmp r0, r1 - beq dtor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b dtor_loop -dtor_end: - - /* Call atexit functions */ - ldr r2, =_execute_at_exit_fns - blx r2 - - /* Call debug_exit with return result/exit parameter */ - mov r0, r5 - ldr r2, =debug_exit - blx r2 -#endif - - /* Returned from application entry point, loop forever. */ -exit_loop: - b exit_loop - - .thumb_func -memory_copy: - cmp r0, r1 - beq 2f - subs r2, r2, r1 - beq 2f -1: - ldrb r3, [r0] - adds r0, r0, #1 - strb r3, [r1] - adds r1, r1, #1 - subs r2, r2, #1 - bne 1b -2: - bx lr - - .thumb_func -memory_set: - cmp r0, r1 - beq 1f - strb r2, [r0] - adds r0, r0, #1 - b memory_set -1: - bx lr - - // default C/C++ library helpers - -.macro HELPER helper_name - .section .text.\helper_name, "ax", %progbits - .balign 2 - .global \helper_name - .weak \helper_name -\helper_name: - .thumb_func -.endm - -.macro JUMPTO name -#if defined(__thumb__) && !defined(__thumb2__) - mov r12, r0 - ldr r0, =\name - push {r0} - mov r0, r12 - pop {pc} -#else - b \name -#endif -.endm - -HELPER __aeabi_read_tp - ldr r0, =__tbss_start__-8 - bx lr -HELPER abort - b . -HELPER __assert - b . -HELPER __aeabi_assert - b . -HELPER __sync_synchronize - bx lr -HELPER __getchar - JUMPTO debug_getchar -HELPER __putchar - JUMPTO debug_putchar -HELPER __open - JUMPTO debug_fopen -HELPER __close - JUMPTO debug_fclose -HELPER __write - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fwrite -HELPER __read - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fread -HELPER __seek - push {r4, lr} - mov r4, r0 - bl debug_fseek - cmp r0, #0 - bne 1f - mov r0, r4 - bl debug_ftell - pop {r4, pc} -1: - ldr r0, =-1 - pop {r4, pc} - // char __user_locale_name_buffer[]; - .section .bss.__user_locale_name_buffer, "aw", %nobits - .global __user_locale_name_buffer - .weak __user_locale_name_buffer - __user_locale_name_buffer: - .word 0x0 - -#ifdef FULL_LIBRARY - .bss -args: - .space ARGSSPACE -#endif - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - diff --git a/examples/host/cdc_msc_hid/ses/lpc43xx/LPC4300_Startup.s b/examples/host/cdc_msc_hid/ses/lpc43xx/LPC4300_Startup.s deleted file mode 100644 index 3df2ad96..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc43xx/LPC4300_Startup.s +++ /dev/null @@ -1,126 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * NO_FPU_ENABLE * - * * - * If defined, FPU will not be enabled. * - * * - * NO_STACK_INIT * - * * - * If defined, the stack pointer will not be initialised. * - * * - * NO_SYSTEM_INIT * - * * - * If defined, the SystemInit() function will not be called. By default * - * SystemInit() is called after reset to enable the clocks and memories to * - * be initialised prior to any C startup initialisation. * - * * - * NO_VTOR_CONFIG * - * * - * If defined, the vector table offset register will not be configured. * - * * - * MEMORY_INIT * - * * - * If defined, the MemoryInit() function will be called. By default * - * MemoryInit() is called after SystemInit() to enable an external memory * - * controller. * - * * - * STACK_INIT_VAL * - * * - * If defined, specifies the initial stack pointer value. If undefined, * - * the stack pointer will be initialised to point to the end of the * - * RAM segment. * - * * - * VECTORS_IN_RAM * - * * - * If defined, the exception vectors will be copied from Flash to RAM. * - * * - *****************************************************************************/ - - .syntax unified - - .global Reset_Handler - .extern _vectors - - .section .init, "ax" - .thumb_func - - .equ VTOR_REG, 0xE000ED08 - .equ FPU_CPACR_REG, 0xE000ED88 - -#ifndef STACK_INIT_VAL -#define STACK_INIT_VAL __RAM_segment_end__ -#endif - -Reset_Handler: -#ifndef NO_STACK_INIT - /* Initialise main stack */ - ldr r0, =STACK_INIT_VAL - ldr r1, =0x7 - bics r0, r1 - mov sp, r0 -#endif - -#ifndef NO_SYSTEM_INIT - /* Initialise system */ - ldr r0, =SystemInit - blx r0 -#endif - -#ifdef MEMORY_INIT - ldr r0, =MemoryInit - blx r0 -#endif - -#ifdef VECTORS_IN_RAM - /* Copy exception vectors into RAM */ - ldr r0, =__vectors_start__ - ldr r1, =__vectors_end__ - ldr r2, =__vectors_ram_start__ -1: - cmp r0, r1 - beq 2f - ldr r3, [r0] - str r3, [r2] - adds r0, r0, #4 - adds r2, r2, #4 - b 1b -2: -#endif - -#ifndef NO_VTOR_CONFIG - /* Configure vector table offset register */ - ldr r0, =VTOR_REG -#ifdef VECTORS_IN_RAM - ldr r1, =_vectors_ram -#else - ldr r1, =_vectors -#endif - str r1, [r0] -#endif - -#if (defined(__ARM_ARCH_FPV4_SP_D16__) || defined(__ARM_ARCH_FPV5_D16__)) && !defined(NO_FPU_ENABLE) - /* Enable FPU */ - ldr r0, =FPU_CPACR_REG - ldr r1, [r0] - orr r1, r1, #(0xF << 20) - str r1, [r0] - dsb - isb -#endif - - /* Jump to program start */ - b _start - - diff --git a/examples/host/cdc_msc_hid/ses/lpc43xx/LPC4300_Target.js b/examples/host/cdc_msc_hid/ses/lpc43xx/LPC4300_Target.js deleted file mode 100644 index 20560af4..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc43xx/LPC4300_Target.js +++ /dev/null @@ -1,19 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -function Reset() { - TargetInterface.resetAndStop(); -} - -function EnableTrace(traceInterfaceType) { - // TODO: Enable trace -} - diff --git a/examples/host/cdc_msc_hid/ses/lpc43xx/LPC4357 Cortex-M4_MemoryMap.xml b/examples/host/cdc_msc_hid/ses/lpc43xx/LPC4357 Cortex-M4_MemoryMap.xml deleted file mode 100644 index eb42b7bf..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc43xx/LPC4357 Cortex-M4_MemoryMap.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/examples/host/cdc_msc_hid/ses/lpc43xx/LPC43xx_Registers.xml b/examples/host/cdc_msc_hid/ses/lpc43xx/LPC43xx_Registers.xml deleted file mode 100644 index 9c094646..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc43xx/LPC43xx_Registers.xml +++ /dev/null @@ -1,33526 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/host/cdc_msc_hid/ses/lpc43xx/LPC43xx_Vectors.s b/examples/host/cdc_msc_hid/ses/lpc43xx/LPC43xx_Vectors.s deleted file mode 100644 index ab223b8a..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc43xx/LPC43xx_Vectors.s +++ /dev/null @@ -1,540 +0,0 @@ -/***************************************************************************** - * SEGGER Microcontroller GmbH & Co. KG * - * Solutions for real time microcontroller applications * - ***************************************************************************** - * * - * (c) 2017 SEGGER Microcontroller GmbH & Co. KG * - * * - * Internet: www.segger.com Support: support@segger.com * - * * - *****************************************************************************/ - -/***************************************************************************** - * Preprocessor Definitions * - * ------------------------ * - * VECTORS_IN_RAM * - * * - * If defined, an area of RAM will large enough to store the vector table * - * will be reserved. * - * * - *****************************************************************************/ - - .syntax unified - .code 16 - - .section .init, "ax" - .align 0 - -/***************************************************************************** - * Default Exception Handlers * - *****************************************************************************/ - - .thumb_func - .weak NMI_Handler -NMI_Handler: - b . - - .thumb_func - .weak HardFault_Handler -HardFault_Handler: - b . - - .thumb_func - .weak SVC_Handler -SVC_Handler: - b . - - .thumb_func - .weak PendSV_Handler -PendSV_Handler: - b . - - .thumb_func - .weak SysTick_Handler -SysTick_Handler: - b . - - .thumb_func -Dummy_Handler: - b . - -#if defined(__OPTIMIZATION_SMALL) - - .weak DAC_IRQHandler - .thumb_set DAC_IRQHandler,Dummy_Handler - - .weak DMA_IRQHandler - .thumb_set DMA_IRQHandler,Dummy_Handler - - .weak FLASH_IRQHandler - .thumb_set FLASH_IRQHandler,Dummy_Handler - - .weak ETHERNET_IRQHandler - .thumb_set ETHERNET_IRQHandler,Dummy_Handler - - .weak SDIO_IRQHandler - .thumb_set SDIO_IRQHandler,Dummy_Handler - - .weak LCD_IRQHandler - .thumb_set LCD_IRQHandler,Dummy_Handler - - .weak USB0_IRQHandler - .thumb_set USB0_IRQHandler,Dummy_Handler - - .weak USB1_IRQHandler - .thumb_set USB1_IRQHandler,Dummy_Handler - - .weak SCT_IRQHandler - .thumb_set SCT_IRQHandler,Dummy_Handler - - .weak RITIMER_IRQHandler - .thumb_set RITIMER_IRQHandler,Dummy_Handler - - .weak TIMER0_IRQHandler - .thumb_set TIMER0_IRQHandler,Dummy_Handler - - .weak TIMER1_IRQHandler - .thumb_set TIMER1_IRQHandler,Dummy_Handler - - .weak TIMER2_IRQHandler - .thumb_set TIMER2_IRQHandler,Dummy_Handler - - .weak TIMER3_IRQHandler - .thumb_set TIMER3_IRQHandler,Dummy_Handler - - .weak MCPWM_IRQHandler - .thumb_set MCPWM_IRQHandler,Dummy_Handler - - .weak ADC0_IRQHandler - .thumb_set ADC0_IRQHandler,Dummy_Handler - - .weak I2C0_IRQHandler - .thumb_set I2C0_IRQHandler,Dummy_Handler - - .weak I2C1_IRQHandler - .thumb_set I2C1_IRQHandler,Dummy_Handler - - .weak SPI_INT_IRQHandler - .thumb_set SPI_INT_IRQHandler,Dummy_Handler - - .weak ADC1_IRQHandler - .thumb_set ADC1_IRQHandler,Dummy_Handler - - .weak SSP0_IRQHandler - .thumb_set SSP0_IRQHandler,Dummy_Handler - - .weak SSP1_IRQHandler - .thumb_set SSP1_IRQHandler,Dummy_Handler - - .weak USART0_IRQHandler - .thumb_set USART0_IRQHandler,Dummy_Handler - - .weak UART1_IRQHandler - .thumb_set UART1_IRQHandler,Dummy_Handler - - .weak USART2_IRQHandler - .thumb_set USART2_IRQHandler,Dummy_Handler - - .weak USART3_IRQHandler - .thumb_set USART3_IRQHandler,Dummy_Handler - - .weak I2S0_IRQHandler - .thumb_set I2S0_IRQHandler,Dummy_Handler - - .weak I2S1_IRQHandler - .thumb_set I2S1_IRQHandler,Dummy_Handler - - .weak SPIFI_IRQHandler - .thumb_set SPIFI_IRQHandler,Dummy_Handler - - .weak SGPIO_IINT_IRQHandler - .thumb_set SGPIO_IINT_IRQHandler,Dummy_Handler - - .weak PIN_INT0_IRQHandler - .thumb_set PIN_INT0_IRQHandler,Dummy_Handler - - .weak PIN_INT1_IRQHandler - .thumb_set PIN_INT1_IRQHandler,Dummy_Handler - - .weak PIN_INT2_IRQHandler - .thumb_set PIN_INT2_IRQHandler,Dummy_Handler - - .weak PIN_INT3_IRQHandler - .thumb_set PIN_INT3_IRQHandler,Dummy_Handler - - .weak PIN_INT4_IRQHandler - .thumb_set PIN_INT4_IRQHandler,Dummy_Handler - - .weak PIN_INT5_IRQHandler - .thumb_set PIN_INT5_IRQHandler,Dummy_Handler - - .weak PIN_INT6_IRQHandler - .thumb_set PIN_INT6_IRQHandler,Dummy_Handler - - .weak PIN_INT7_IRQHandler - .thumb_set PIN_INT7_IRQHandler,Dummy_Handler - - .weak GINT0_IRQHandler - .thumb_set GINT0_IRQHandler,Dummy_Handler - - .weak GINT1_IRQHandler - .thumb_set GINT1_IRQHandler,Dummy_Handler - - .weak EVENTROUTER_IRQHandler - .thumb_set EVENTROUTER_IRQHandler,Dummy_Handler - - .weak C_CAN1_IRQHandler - .thumb_set C_CAN1_IRQHandler,Dummy_Handler - - .weak ADCHS_IRQHandler - .thumb_set ADCHS_IRQHandler,Dummy_Handler - - .weak ATIMER_IRQHandler - .thumb_set ATIMER_IRQHandler,Dummy_Handler - - .weak RTC_IRQHandler - .thumb_set RTC_IRQHandler,Dummy_Handler - - .weak WWDT_IRQHandler - .thumb_set WWDT_IRQHandler,Dummy_Handler - - .weak C_CAN0_IRQHandler - .thumb_set C_CAN0_IRQHandler,Dummy_Handler - - .weak QEI_IRQHandler - .thumb_set QEI_IRQHandler,Dummy_Handler - -#else - - .thumb_func - .weak DAC_IRQHandler -DAC_IRQHandler: - b . - - .thumb_func - .weak DMA_IRQHandler -DMA_IRQHandler: - b . - - .thumb_func - .weak FLASH_IRQHandler -FLASH_IRQHandler: - b . - - .thumb_func - .weak ETHERNET_IRQHandler -ETHERNET_IRQHandler: - b . - - .thumb_func - .weak SDIO_IRQHandler -SDIO_IRQHandler: - b . - - .thumb_func - .weak LCD_IRQHandler -LCD_IRQHandler: - b . - - .thumb_func - .weak USB0_IRQHandler -USB0_IRQHandler: - b . - - .thumb_func - .weak USB1_IRQHandler -USB1_IRQHandler: - b . - - .thumb_func - .weak SCT_IRQHandler -SCT_IRQHandler: - b . - - .thumb_func - .weak RITIMER_IRQHandler -RITIMER_IRQHandler: - b . - - .thumb_func - .weak TIMER0_IRQHandler -TIMER0_IRQHandler: - b . - - .thumb_func - .weak TIMER1_IRQHandler -TIMER1_IRQHandler: - b . - - .thumb_func - .weak TIMER2_IRQHandler -TIMER2_IRQHandler: - b . - - .thumb_func - .weak TIMER3_IRQHandler -TIMER3_IRQHandler: - b . - - .thumb_func - .weak MCPWM_IRQHandler -MCPWM_IRQHandler: - b . - - .thumb_func - .weak ADC0_IRQHandler -ADC0_IRQHandler: - b . - - .thumb_func - .weak I2C0_IRQHandler -I2C0_IRQHandler: - b . - - .thumb_func - .weak I2C1_IRQHandler -I2C1_IRQHandler: - b . - - .thumb_func - .weak SPI_INT_IRQHandler -SPI_INT_IRQHandler: - b . - - .thumb_func - .weak ADC1_IRQHandler -ADC1_IRQHandler: - b . - - .thumb_func - .weak SSP0_IRQHandler -SSP0_IRQHandler: - b . - - .thumb_func - .weak SSP1_IRQHandler -SSP1_IRQHandler: - b . - - .thumb_func - .weak USART0_IRQHandler -USART0_IRQHandler: - b . - - .thumb_func - .weak UART1_IRQHandler -UART1_IRQHandler: - b . - - .thumb_func - .weak USART2_IRQHandler -USART2_IRQHandler: - b . - - .thumb_func - .weak USART3_IRQHandler -USART3_IRQHandler: - b . - - .thumb_func - .weak I2S0_IRQHandler -I2S0_IRQHandler: - b . - - .thumb_func - .weak I2S1_IRQHandler -I2S1_IRQHandler: - b . - - .thumb_func - .weak SPIFI_IRQHandler -SPIFI_IRQHandler: - b . - - .thumb_func - .weak SGPIO_IINT_IRQHandler -SGPIO_IINT_IRQHandler: - b . - - .thumb_func - .weak PIN_INT0_IRQHandler -PIN_INT0_IRQHandler: - b . - - .thumb_func - .weak PIN_INT1_IRQHandler -PIN_INT1_IRQHandler: - b . - - .thumb_func - .weak PIN_INT2_IRQHandler -PIN_INT2_IRQHandler: - b . - - .thumb_func - .weak PIN_INT3_IRQHandler -PIN_INT3_IRQHandler: - b . - - .thumb_func - .weak PIN_INT4_IRQHandler -PIN_INT4_IRQHandler: - b . - - .thumb_func - .weak PIN_INT5_IRQHandler -PIN_INT5_IRQHandler: - b . - - .thumb_func - .weak PIN_INT6_IRQHandler -PIN_INT6_IRQHandler: - b . - - .thumb_func - .weak PIN_INT7_IRQHandler -PIN_INT7_IRQHandler: - b . - - .thumb_func - .weak GINT0_IRQHandler -GINT0_IRQHandler: - b . - - .thumb_func - .weak GINT1_IRQHandler -GINT1_IRQHandler: - b . - - .thumb_func - .weak EVENTROUTER_IRQHandler -EVENTROUTER_IRQHandler: - b . - - .thumb_func - .weak C_CAN1_IRQHandler -C_CAN1_IRQHandler: - b . - - .thumb_func - .weak ADCHS_IRQHandler -ADCHS_IRQHandler: - b . - - .thumb_func - .weak ATIMER_IRQHandler -ATIMER_IRQHandler: - b . - - .thumb_func - .weak RTC_IRQHandler -RTC_IRQHandler: - b . - - .thumb_func - .weak WWDT_IRQHandler -WWDT_IRQHandler: - b . - - .thumb_func - .weak C_CAN0_IRQHandler -C_CAN0_IRQHandler: - b . - - .thumb_func - .weak QEI_IRQHandler -QEI_IRQHandler: - b . - -#endif - -/***************************************************************************** - * Vector Table * - *****************************************************************************/ - - .section .vectors, "ax" - .align 0 - .global _vectors - .extern __stack_end__ - .extern Reset_Handler - -_vectors: - .word __stack_end__ - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word SVC_Handler - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word PendSV_Handler - .word SysTick_Handler - .word DAC_IRQHandler - .word Dummy_Handler /* Reserved */ - .word DMA_IRQHandler - .word Dummy_Handler /* Reserved */ - .word FLASH_IRQHandler - .word ETHERNET_IRQHandler - .word SDIO_IRQHandler - .word LCD_IRQHandler - .word USB0_IRQHandler - .word USB1_IRQHandler - .word SCT_IRQHandler - .word RITIMER_IRQHandler - .word TIMER0_IRQHandler - .word TIMER1_IRQHandler - .word TIMER2_IRQHandler - .word TIMER3_IRQHandler - .word MCPWM_IRQHandler - .word ADC0_IRQHandler - .word I2C0_IRQHandler - .word I2C1_IRQHandler - .word SPI_INT_IRQHandler - .word ADC1_IRQHandler - .word SSP0_IRQHandler - .word SSP1_IRQHandler - .word USART0_IRQHandler - .word UART1_IRQHandler - .word USART2_IRQHandler - .word USART3_IRQHandler - .word I2S0_IRQHandler - .word I2S1_IRQHandler - .word SPIFI_IRQHandler - .word SGPIO_IINT_IRQHandler - .word PIN_INT0_IRQHandler - .word PIN_INT1_IRQHandler - .word PIN_INT2_IRQHandler - .word PIN_INT3_IRQHandler - .word PIN_INT4_IRQHandler - .word PIN_INT5_IRQHandler - .word PIN_INT6_IRQHandler - .word PIN_INT7_IRQHandler - .word GINT0_IRQHandler - .word GINT1_IRQHandler - .word EVENTROUTER_IRQHandler - .word C_CAN1_IRQHandler - .word Dummy_Handler /* Reserved */ - .word ADCHS_IRQHandler - .word ATIMER_IRQHandler - .word RTC_IRQHandler - .word Dummy_Handler /* Reserved */ - .word WWDT_IRQHandler - .word Dummy_Handler /* Reserved */ - .word C_CAN0_IRQHandler - .word QEI_IRQHandler -_vectors_end: - -#ifdef VECTORS_IN_RAM - .section .vectors_ram, "ax" - .align 0 - .global _vectors_ram - -_vectors_ram: - .space _vectors_end - _vectors, 0 -#endif diff --git a/examples/host/cdc_msc_hid/ses/lpc43xx/flash_placement.xml b/examples/host/cdc_msc_hid/ses/lpc43xx/flash_placement.xml deleted file mode 100644 index 79bedc53..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc43xx/flash_placement.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/host/cdc_msc_hid/ses/lpc43xx/lpc43xx.emProject b/examples/host/cdc_msc_hid/ses/lpc43xx/lpc43xx.emProject deleted file mode 100644 index 2d99ae6c..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc43xx/lpc43xx.emProject +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/host/cdc_msc_hid/ses/lpc43xx/thumb_crt0.s b/examples/host/cdc_msc_hid/ses/lpc43xx/thumb_crt0.s deleted file mode 100644 index 17f88e0c..00000000 --- a/examples/host/cdc_msc_hid/ses/lpc43xx/thumb_crt0.s +++ /dev/null @@ -1,415 +0,0 @@ -// ********************************************************************** -// * SEGGER Microcontroller GmbH * -// * The Embedded Experts * -// ********************************************************************** -// * * -// * (c) 2014 - 2018 SEGGER Microcontroller GmbH * -// * (c) 2001 - 2018 Rowley Associates Limited * -// * * -// * www.segger.com Support: support@segger.com * -// * * -// ********************************************************************** -// * * -// * All rights reserved. * -// * * -// * Redistribution and use in source and binary forms, with or * -// * without modification, are permitted provided that the following * -// * conditions are met: * -// * * -// * - Redistributions of source code must retain the above copyright * -// * notice, this list of conditions and the following disclaimer. * -// * * -// * - Neither the name of SEGGER Microcontroller GmbH * -// * nor the names of its contributors may be used to endorse or * -// * promote products derived from this software without specific * -// * prior written permission. * -// * * -// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * -// * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * -// * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * -// * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * -// * DISCLAIMED. * -// * IN NO EVENT SHALL SEGGER Microcontroller GmbH BE LIABLE FOR * -// * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * -// * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * -// * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * -// * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * -// * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * -// * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * -// * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * -// * DAMAGE. * -// * * -// ********************************************************************** -// -// -// Preprocessor Definitions -// ------------------------ -// APP_ENTRY_POINT -// -// Defines the application entry point function, if undefined this setting -// defaults to "main". -// -// INITIALIZE_STACK -// -// If defined, the contents of the stack will be initialized to a the -// value 0xCC. -// -// INITIALIZE_SECONDARY_SECTIONS -// -// If defined, the .data2, .text2, .rodata2 and .bss2 sections will be initialized. -// -// INITIALIZE_TCM_SECTIONS -// -// If defined, the .data_tcm, .text_tcm, .rodata_tcm and .bss_tcm sections -// will be initialized. -// -// INITIALIZE_USER_SECTIONS -// -// If defined, the function InitializeUserMemorySections will be called prior -// to entering main in order to allow the user to initialize any user defined -// memory sections. -// -// FULL_LIBRARY -// -// If defined then -// - argc, argv are setup by the debug_getargs. -// - the exit symbol is defined and executes on return from main. -// - the exit symbol calls destructors, atexit functions and then debug_exit. -// -// If not defined then -// - argc and argv are zero. -// - the exit symbol is defined, executes on return from main and loops -// - -#ifndef APP_ENTRY_POINT -#define APP_ENTRY_POINT main -#endif - -#ifndef ARGSSPACE -#define ARGSSPACE 128 -#endif - .syntax unified - - .global _start - .extern APP_ENTRY_POINT - .global exit - .weak exit - -#ifdef INITIALIZE_USER_SECTIONS - .extern InitializeUserMemorySections -#endif - - .section .init, "ax" - .code 16 - .balign 2 - .thumb_func - -_start: - /* Set up main stack if size > 0 */ - ldr r1, =__stack_end__ - ldr r0, =__stack_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - mov sp, r1 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - ldr r0, =__stack_start__ - bl memory_set -#endif -1: - - /* Set up process stack if size > 0 */ - ldr r1, =__stack_process_end__ - ldr r0, =__stack_process_start__ - subs r2, r1, r0 - beq 1f -#ifdef __ARM_EABI__ - movs r2, #0x7 - bics r1, r2 -#endif - msr psp, r1 - movs r2, #2 - msr control, r2 -#ifdef INITIALIZE_STACK - movs r2, #0xCC - bl memory_set -#endif -1: - - /* Copy initialized memory sections into RAM (if necessary). */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl memory_copy - ldr r0, =__tdata_load_start__ - ldr r1, =__tdata_start__ - ldr r2, =__tdata_end__ - bl memory_copy -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__data2_load_start__ - ldr r1, =__data2_start__ - ldr r2, =__data2_end__ - bl memory_copy - ldr r0, =__text2_load_start__ - ldr r1, =__text2_start__ - ldr r2, =__text2_end__ - bl memory_copy - ldr r0, =__rodata2_load_start__ - ldr r1, =__rodata2_start__ - ldr r2, =__rodata2_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__data_tcm_load_start__ - ldr r1, =__data_tcm_start__ - ldr r2, =__data_tcm_end__ - bl memory_copy - ldr r0, =__text_tcm_load_start__ - ldr r1, =__text_tcm_start__ - ldr r2, =__text_tcm_end__ - bl memory_copy - ldr r0, =__rodata_tcm_load_start__ - ldr r1, =__rodata_tcm_start__ - ldr r2, =__rodata_tcm_end__ - bl memory_copy -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Zero the bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - movs r2, #0 - bl memory_set - ldr r0, =__tbss_start__ - ldr r1, =__tbss_end__ - movs r2, #0 - bl memory_set -#ifdef INITIALIZE_SECONDARY_SECTIONS - ldr r0, =__bss2_start__ - ldr r1, =__bss2_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_SECONDARY_SECTIONS */ -#ifdef INITIALIZE_TCM_SECTIONS - ldr r0, =__bss_tcm_start__ - ldr r1, =__bss_tcm_end__ - mov r2, #0 - bl memory_set -#endif /* #ifdef INITIALIZE_TCM_SECTIONS */ - - /* Initialize the heap */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - subs r1, r1, r0 - cmp r1, #8 - blt 1f - movs r2, #0 - str r2, [r0] - adds r0, r0, #4 - str r1, [r0] -1: - -#ifdef INITIALIZE_USER_SECTIONS - ldr r2, =InitializeUserMemorySections - blx r2 -#endif - - /* Call constructors */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -ctor_loop: - cmp r0, r1 - beq ctor_end - ldr r2, [r0] - adds r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b ctor_loop -ctor_end: - - /* Setup initial call frame */ - movs r0, #0 - mov lr, r0 - mov r12, sp - - .type start, function -start: - /* Jump to application entry point */ -#ifdef FULL_LIBRARY - movs r0, #ARGSSPACE - ldr r1, =args - ldr r2, =debug_getargs - blx r2 - ldr r1, =args -#else - movs r0, #0 - movs r1, #0 -#endif - ldr r2, =APP_ENTRY_POINT - blx r2 - - .thumb_func -exit: -#ifdef FULL_LIBRARY - mov r5, r0 // save the exit parameter/return result - - /* Call destructors */ - ldr r0, =__dtors_start__ - ldr r1, =__dtors_end__ -dtor_loop: - cmp r0, r1 - beq dtor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b dtor_loop -dtor_end: - - /* Call atexit functions */ - ldr r2, =_execute_at_exit_fns - blx r2 - - /* Call debug_exit with return result/exit parameter */ - mov r0, r5 - ldr r2, =debug_exit - blx r2 -#endif - - /* Returned from application entry point, loop forever. */ -exit_loop: - b exit_loop - - .thumb_func -memory_copy: - cmp r0, r1 - beq 2f - subs r2, r2, r1 - beq 2f -1: - ldrb r3, [r0] - adds r0, r0, #1 - strb r3, [r1] - adds r1, r1, #1 - subs r2, r2, #1 - bne 1b -2: - bx lr - - .thumb_func -memory_set: - cmp r0, r1 - beq 1f - strb r2, [r0] - adds r0, r0, #1 - b memory_set -1: - bx lr - - // default C/C++ library helpers - -.macro HELPER helper_name - .section .text.\helper_name, "ax", %progbits - .balign 2 - .global \helper_name - .weak \helper_name -\helper_name: - .thumb_func -.endm - -.macro JUMPTO name -#if defined(__thumb__) && !defined(__thumb2__) - mov r12, r0 - ldr r0, =\name - push {r0} - mov r0, r12 - pop {pc} -#else - b \name -#endif -.endm - -HELPER __aeabi_read_tp - ldr r0, =__tbss_start__-8 - bx lr -HELPER abort - b . -HELPER __assert - b . -HELPER __aeabi_assert - b . -HELPER __sync_synchronize - bx lr -HELPER __getchar - JUMPTO debug_getchar -HELPER __putchar - JUMPTO debug_putchar -HELPER __open - JUMPTO debug_fopen -HELPER __close - JUMPTO debug_fclose -HELPER __write - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fwrite -HELPER __read - mov r3, r0 - mov r0, r1 - movs r1, #1 - JUMPTO debug_fread -HELPER __seek - push {r4, lr} - mov r4, r0 - bl debug_fseek - cmp r0, #0 - bne 1f - mov r0, r4 - bl debug_ftell - pop {r4, pc} -1: - ldr r0, =-1 - pop {r4, pc} - // char __user_locale_name_buffer[]; - .section .bss.__user_locale_name_buffer, "aw", %nobits - .global __user_locale_name_buffer - .weak __user_locale_name_buffer - __user_locale_name_buffer: - .word 0x0 - -#ifdef FULL_LIBRARY - .bss -args: - .space ARGSSPACE -#endif - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - From 143582870c8a4175706109e238f4cfa814ae90bc Mon Sep 17 00:00:00 2001 From: Rafael Silva Date: Thu, 4 Mar 2021 23:00:48 +0000 Subject: [PATCH 31/72] add efm32gg12 family Signed-off-by: Rafael Silva --- hw/bsp/board_mcu.h | 3 +++ src/tusb_option.h | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/hw/bsp/board_mcu.h b/hw/bsp/board_mcu.h index a175197e..3c18f6d3 100644 --- a/hw/bsp/board_mcu.h +++ b/hw/bsp/board_mcu.h @@ -119,6 +119,9 @@ #elif CFG_TUSB_MCU == OPT_MCU_RP2040 #include "pico.h" + +#elif CFG_TUSB_MCU == OPT_MCU_EFM32GG || CFG_TUSB_MCU == OPT_MCU_EFM32GG11 || CFG_TUSB_MCU == OPT_MCU_EFM32GG12 + #include "em_device.h" #else #error "Missing MCU header" diff --git a/src/tusb_option.h b/src/tusb_option.h index cafe9e52..d0ed78ac 100644 --- a/src/tusb_option.h +++ b/src/tusb_option.h @@ -103,6 +103,11 @@ // NXP Kinetis #define OPT_MCU_MKL25ZXX 1200 ///< NXP MKL25Zxx +// Silabs +#define OPT_MCU_EFM32GG 1300 ///< Silabs EFM32GG +#define OPT_MCU_EFM32GG11 1301 ///< Silabs EFM32GG11 +#define OPT_MCU_EFM32GG12 1302 ///< Silabs EFM32GG12 + /** @} */ /** \defgroup group_supported_os Supported RTOS From fb661a99bd0668044004278cd9473e0a9e07ff04 Mon Sep 17 00:00:00 2001 From: Rafael Silva Date: Thu, 4 Mar 2021 23:20:24 +0000 Subject: [PATCH 32/72] added efm32gg12 family cmsis Signed-off-by: Rafael Silva --- .gitmodules | 3 +++ hw/mcu/silabs/cmsis-dfp-efm32gg12b | 1 + 2 files changed, 4 insertions(+) create mode 160000 hw/mcu/silabs/cmsis-dfp-efm32gg12b diff --git a/.gitmodules b/.gitmodules index c0e6eef0..1a5ae2c5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -113,3 +113,6 @@ [submodule "lib/CMSIS_5"] path = lib/CMSIS_5 url = https://github.com/ARM-software/CMSIS_5.git +[submodule "hw/mcu/silabs/cmsis-dfp-efm32gg12b"] + path = hw/mcu/silabs/cmsis-dfp-efm32gg12b + url = https://github.com/cmsis-packs/cmsis-dfp-efm32gg12b diff --git a/hw/mcu/silabs/cmsis-dfp-efm32gg12b b/hw/mcu/silabs/cmsis-dfp-efm32gg12b new file mode 160000 index 00000000..f1c31b78 --- /dev/null +++ b/hw/mcu/silabs/cmsis-dfp-efm32gg12b @@ -0,0 +1 @@ +Subproject commit f1c31b7887669cb230b3ea63f9b56769078960bc From 2807644e7e72150b96be0f40a263f689a6de994a Mon Sep 17 00:00:00 2001 From: Rafael Silva Date: Thu, 4 Mar 2021 23:02:42 +0000 Subject: [PATCH 33/72] add efm32 driver Signed-off-by: Rafael Silva --- src/portable/silabs/efm32/dcd_efm32.c | 931 ++++++++++++++++++++++++++ 1 file changed, 931 insertions(+) create mode 100644 src/portable/silabs/efm32/dcd_efm32.c diff --git a/src/portable/silabs/efm32/dcd_efm32.c b/src/portable/silabs/efm32/dcd_efm32.c new file mode 100644 index 00000000..bd1f32e6 --- /dev/null +++ b/src/portable/silabs/efm32/dcd_efm32.c @@ -0,0 +1,931 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2021 Rafael Silva (@perigoso) + * Copyright (c) 2021 Ha Thach (tinyusb.org) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * This file is part of the TinyUSB stack. + */ + +#include "tusb_option.h" + +#if TUSB_OPT_DEVICE_ENABLED && ( \ + (CFG_TUSB_MCU == OPT_MCU_EFM32GG) || \ + (CFG_TUSB_MCU == OPT_MCU_EFM32GG11) || \ + (CFG_TUSB_MCU == OPT_MCU_EFM32GG12) ) + +/* Silabs */ +#include "em_device.h" + +#include "device/dcd.h" + +/* + * Since TinyUSB doesn't use SOF for now, and this interrupt too often (1ms interval) + * We disable SOF for now until needed later on + */ +#define USE_SOF 0 + +/* + * Number of endpoints + * 12 software-configurable endpoints (6 IN, 6 OUT) in addition to endpoint 0 + */ +#define EP_COUNT 7 + +/* FIFO size in bytes */ +#define EP_FIFO_SIZE 2048 + +/* Max number of IN EP FIFOs */ +#define EP_FIFO_NUM 7 + +/* */ +typedef struct { + uint8_t *buffer; + uint16_t total_len; + uint16_t queued_len; + uint16_t max_size; + bool short_packet; +} xfer_ctl_t; + +static uint32_t _setup_packet[2]; + +#define XFER_CTL_BASE(_ep, _dir) &xfer_status[_ep][_dir] +static xfer_ctl_t xfer_status[EP_COUNT][2]; + +/* Keep count of how many FIFOs are in use */ +static uint8_t _allocated_fifos = 1; /* FIFO0 is always in use */ + +static volatile uint32_t* tx_fifo[EP_FIFO_NUM] = { + USB->FIFO0D, + USB->FIFO1D, + USB->FIFO2D, + USB->FIFO3D, + USB->FIFO4D, + USB->FIFO5D, + USB->FIFO6D, +}; + +/* Register Helpers */ +#define DCTL_WO_BITMASK (USB_DCTL_CGOUTNAK | USB_DCTL_SGOUTNAK | USB_DCTL_CGNPINNAK | USB_DCTL_SGNPINNAK) +#define GUSBCFG_WO_BITMASK (USB_GUSBCFG_CORRUPTTXPKT) +#define DEPCTL_WO_BITMASK (USB_DIEP_CTL_CNAK | USB_DIEP_CTL_SNAK | USB_DIEP_CTL_SETD0PIDEF | USB_DIEP_CTL_SETD1PIDOF) + +/* Will either return an unused FIFO number, or 0 if all are used. */ +static uint8_t get_free_fifo(void) +{ + if(_allocated_fifos < EP_FIFO_NUM) return _allocated_fifos++; + return 0; +} + +/* +static void flush_rx_fifo(void) +{ + USB->GRSTCTL = USB_GRSTCTL_RXFFLSH; + while(USB->GRSTCTL & USB_GRSTCTL_RXFFLSH); +} +*/ + +static void flush_tx_fifo(uint8_t fifo_num) +{ + USB->GRSTCTL = USB_GRSTCTL_TXFFLSH | (fifo_num << _USB_GRSTCTL_TXFNUM_SHIFT); + while(USB->GRSTCTL & USB_GRSTCTL_TXFFLSH); +} + +/* Setup the control endpoint 0. */ +static void bus_reset(void) +{ + USB->DOEP0CTL |= USB_DIEP_CTL_SNAK; + for(uint8_t i = 0; i < EP_COUNT - 1; i++) + { + USB->DOEP[i].CTL |= USB_DIEP_CTL_SNAK; + } + + /* reset address */ + USB->DCFG &= ~_USB_DCFG_DEVADDR_MASK; + + USB->DAINTMSK |= USB_DAINTMSK_OUTEPMSK0 | USB_DAINTMSK_INEPMSK0; + USB->DOEPMSK |= USB_DOEPMSK_SETUPMSK | USB_DOEPMSK_XFERCOMPLMSK; + USB->DIEPMSK |= USB_DIEPMSK_TIMEOUTMSK | USB_DIEPMSK_XFERCOMPLMSK; + + /* + * - All EP OUT shared a unique OUT FIFO which uses + * * 10 locations in hardware for setup packets + setup control words (up to 3 setup packets). + * * 2 locations for OUT endpoint control words. + * * 16 for largest packet size of 64 bytes. ( TODO Highspeed is 512 bytes) + * * 1 location for global NAK (not required/used here). + * * It is recommended to allocate 2 times the largest packet size, therefore + * Recommended value = 10 + 1 + 2 x (16+2) = 47 --> Let's make it 52 + */ + flush_tx_fifo(_USB_GRSTCTL_TXFNUM_FALL); // Flush All + USB->GRXFSIZ = 52; + + /* Control IN uses FIFO 0 with 64 bytes ( 16 32-bit word ) */ + USB->GNPTXFSIZ = (16 << _USB_GNPTXFSIZ_NPTXFINEPTXF0DEP_SHIFT) | (USB->GRXFSIZ & _USB_GNPTXFSIZ_NPTXFSTADDR_MASK); + + /* Ready to receive SETUP packet */ + USB->DOEP0TSIZ |= (1 << _USB_DOEP0TSIZ_SUPCNT_SHIFT); + + USB->GINTMSK |= USB_GINTMSK_IEPINTMSK | USB_GINTMSK_OEPINTMSK; +} + +static void enum_done_processing(void) +{ + /* Maximum packet size for EP 0 is set for both directions by writing DIEPCTL */ + if((USB->DSTS & _USB_DSTS_ENUMSPD_MASK) == USB_DSTS_ENUMSPD_FS) + { + /* Full Speed (PHY on 48 MHz) */ + USB->DOEP0CTL = (USB->DOEP0CTL & ~_USB_DOEP0CTL_MPS_MASK) | _USB_DOEP0CTL_MPS_64B; /* Maximum Packet Size 64 bytes */ + USB->DOEP0CTL &= ~_USB_DOEP0CTL_STALL_MASK; /* clear Stall */ + xfer_status[0][TUSB_DIR_OUT].max_size = 64; + xfer_status[0][TUSB_DIR_IN].max_size = 64; + } + else + { + /* Low Speed (PHY on 6 MHz) */ + USB->DOEP0CTL = (USB->DOEP0CTL & ~_USB_DOEP0CTL_MPS_MASK) | _USB_DOEP0CTL_MPS_8B; /* Maximum Packet Size 64 bytes */ + USB->DOEP0CTL &= ~_USB_DOEP0CTL_STALL_MASK; /* clear Stall */ + xfer_status[0][TUSB_DIR_OUT].max_size = 8; + xfer_status[0][TUSB_DIR_IN].max_size = 8; + } +} + + +/*------------------------------------------------------------------*/ +/* Controller API */ +/*------------------------------------------------------------------*/ +void dcd_init(uint8_t rhport) +{ + (void) rhport; + + /* Reset Core */ + USB->PCGCCTL &= ~USB_PCGCCTL_STOPPCLK; + USB->PCGCCTL &= ~(USB_PCGCCTL_PWRCLMP | USB_PCGCCTL_RSTPDWNMODULE); + + /* Core Soft Reset */ + USB->GRSTCTL |= USB_GRSTCTL_CSFTRST; + while(USB->GRSTCTL & USB_GRSTCTL_CSFTRST); + + while(!(USB->GRSTCTL & USB_GRSTCTL_AHBIDLE)); + + /* Enable PHY pins */ + USB->ROUTE = USB_ROUTE_PHYPEN; + + dcd_disconnect(rhport); + + /* + * Set device speed (Full speed PHY) + * Stall on non-zero len status OUT packets (ctrl transfers) + * periodic frame interval to 80% + */ + USB->DCFG = (USB->DCFG & ~(_USB_DCFG_DEVSPD_MASK | _USB_DCFG_PERFRINT_MASK)) | USB_DCFG_DEVSPD_FS | USB_DCFG_NZSTSOUTHSHK; + + /* Enable Global Interrupts */ + USB->GAHBCFG = (USB->GAHBCFG & ~_USB_GAHBCFG_HBSTLEN_MASK) | USB_GAHBCFG_GLBLINTRMSK; + + /* Force Device Mode */ + USB->GUSBCFG = (USB->GUSBCFG & ~(GUSBCFG_WO_BITMASK | USB_GUSBCFG_FORCEHSTMODE)) | USB_GUSBCFG_FORCEDEVMODE; + + /* No Overrides */ + USB->GOTGCTL &= ~(USB_GOTGCTL_BVALIDOVVAL | USB_GOTGCTL_BVALIDOVEN | USB_GOTGCTL_VBVALIDOVVAL); + + /* Ignore frame numbers on ISO transfers. */ + USB->DCTL = (USB->DCTL & ~DCTL_WO_BITMASK) | USB_DCTL_IGNRFRMNUM; + + /* Setting SNAKs */ + USB->DOEP0CTL |= USB_DIEP_CTL_SNAK; + for(uint8_t i = 0; i < EP_COUNT - 1; i++) + { + USB->DOEP[i].CTL |= USB_DIEP_CTL_SNAK; + } + + /* D. Interruption masking */ + /* Disable all device interrupts */ + USB->DIEPMSK = 0; + USB->DOEPMSK = 0; + USB->DAINTMSK = 0; + USB->DIEPEMPMSK = 0; + USB->GINTMSK = 0; + USB->GOTGINT = ~0U; /* clear OTG ints */ + USB->GINTSTS = ~0U; /* clear pending ints */ + USB->GINTMSK = USB_GINTMSK_MODEMISMSK | + #if USE_SOF + USB_GINTMSK_SOFMSK | + #endif + USB_GINTMSK_ERLYSUSPMSK | + USB_GINTMSK_USBSUSPMSK | + USB_GINTMSK_USBRSTMSK | + USB_GINTMSK_ENUMDONEMSK | + USB_GINTMSK_RESETDETMSK | + USB_GINTMSK_DISCONNINTMSK; + + NVIC_ClearPendingIRQ(USB_IRQn); + + dcd_connect(rhport); +} + +void dcd_set_address(uint8_t rhport, uint8_t dev_addr) +{ + (void) rhport; + + USB->DCFG = (USB->DCFG & ~_USB_DCFG_DEVADDR_MASK) | (dev_addr << _USB_DCFG_DEVADDR_SHIFT); + + /* Response with status after changing device address */ + dcd_edpt_xfer(rhport, tu_edpt_addr(0, TUSB_DIR_IN), NULL, 0); +} + +void dcd_remote_wakeup(uint8_t rhport) +{ + (void) rhport; +} + +void dcd_connect(uint8_t rhport) +{ + (void) rhport; + + /* connect by enabling internal pull-up resistor on D+/D- */ + USB->DCTL &= ~(DCTL_WO_BITMASK | USB_DCTL_SFTDISCON); +} + +void dcd_disconnect(uint8_t rhport) +{ + (void) rhport; + + /* disconnect by disabling internal pull-up resistor on D+/D- */ + USB->DCTL = (USB->DCTL & ~(DCTL_WO_BITMASK)) | USB_DCTL_SFTDISCON; +} + +/*------------------------------------------------------------------*/ +/* DCD Endpoint Port */ +/*------------------------------------------------------------------*/ +void dcd_edpt_stall(uint8_t rhport, uint8_t ep_addr) +{ + (void) rhport; + + uint8_t const epnum = tu_edpt_number(ep_addr); + uint8_t const dir = tu_edpt_dir(ep_addr); + + if(dir == TUSB_DIR_IN) + { + if(epnum == 0) + { + USB->DIEP0CTL = (USB->DIEP0CTL & ~DEPCTL_WO_BITMASK) | USB_DIEP0CTL_SNAK | USB_DIEP0CTL_STALL; + + flush_tx_fifo(_USB_GRSTCTL_TXFNUM_F0); + } + else + { + /* Only disable currently enabled non-control endpoint */ + if(USB->DIEP[epnum - 1].CTL & USB_DIEP_CTL_EPENA) + { + USB->DIEP[epnum - 1].CTL = (USB->DIEP[epnum - 1].CTL & ~DEPCTL_WO_BITMASK) | USB_DIEP_CTL_EPDIS | USB_DIEP_CTL_SNAK | USB_DIEP_CTL_STALL; + while(!(USB->DIEP[epnum - 1].INT & USB_DIEP_INT_EPDISBLD)); + USB->DIEP[epnum - 1].INT |= USB_DIEP_INT_EPDISBLD; + } + else + { + USB->DIEP[epnum - 1].CTL = (USB->DIEP[epnum - 1].CTL & ~DEPCTL_WO_BITMASK) | USB_DIEP_CTL_SNAK | USB_DIEP_CTL_STALL; + } + + /* Flush the FIFO */ + uint8_t const fifo_num = ((USB->DIEP[epnum - 1].CTL & _USB_DIEP_CTL_TXFNUM_MASK) >> _USB_DIEP_CTL_TXFNUM_SHIFT); + flush_tx_fifo(fifo_num); + } + } + else + { + if(epnum == 0) + { + USB->DOEP0CTL = (USB->DOEP0CTL & ~DEPCTL_WO_BITMASK) | USB_DIEP0CTL_STALL; + } + else + { + /* Only disable currently enabled non-control endpoint */ + if(USB->DOEP[epnum - 1].CTL & USB_DIEP_CTL_EPENA) + { + /* Asserting GONAK is required to STALL an OUT endpoint. */ + USB->DCTL |= USB_DCTL_SGOUTNAK; + while(!(USB->GINTSTS & USB_GINTSTS_GOUTNAKEFF)); + + /* Disable the endpoint. Note that only STALL and not SNAK is set here. */ + USB->DOEP[epnum - 1].CTL = (USB->DOEP[epnum - 1].CTL & ~DEPCTL_WO_BITMASK) | USB_DIEP_CTL_EPDIS | USB_DIEP_CTL_STALL; + while(USB->DOEP[epnum - 1].INT & USB_DIEP_INT_EPDISBLD); + USB->DOEP[epnum - 1].INT |= USB_DIEP_INT_EPDISBLD; + + /* Allow other OUT endpoints to keep receiving. */ + USB->DCTL |= USB_DCTL_CGOUTNAK; + } + else + { + USB->DIEP[epnum - 1].CTL = (USB->DIEP[epnum - 1].CTL & ~DEPCTL_WO_BITMASK) | USB_DIEP_CTL_STALL; + } + } + } +} + +void dcd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr) +{ + (void) rhport; + + uint8_t const epnum = tu_edpt_number(ep_addr); + uint8_t const dir = tu_edpt_dir(ep_addr); + + if(dir == TUSB_DIR_IN) + { + if(epnum == 0) + { + USB->DIEP0CTL &= ~(DEPCTL_WO_BITMASK | USB_DIEP0CTL_STALL); + } + else + { + USB->DIEP[epnum - 1].CTL &= ~(DEPCTL_WO_BITMASK | USB_DIEP_CTL_STALL); + + /* Required by USB spec to reset DATA toggle bit to DATA0 on interrupt and bulk endpoints. */ + uint8_t eptype = (USB->DIEP[epnum - 1].CTL & _USB_DIEP_CTL_EPTYPE_MASK) >> _USB_DIEP_CTL_EPTYPE_SHIFT; + + if((eptype == _USB_DIEP_CTL_EPTYPE_BULK) || (eptype == _USB_DIEP_CTL_EPTYPE_INT)) + { + USB->DIEP[epnum - 1].CTL |= USB_DIEP_CTL_SETD0PIDEF; + } + } + } + else + { + if(epnum == 0) + { + USB->DOEP0CTL &= ~(DEPCTL_WO_BITMASK | USB_DOEP0CTL_STALL); + } + else + { + USB->DOEP[epnum - 1].CTL &= ~(DEPCTL_WO_BITMASK | USB_DOEP_CTL_STALL); + + /* Required by USB spec to reset DATA toggle bit to DATA0 on interrupt and bulk endpoints. */ + uint8_t eptype = (USB->DOEP[epnum - 1].CTL & _USB_DOEP_CTL_EPTYPE_MASK) >> _USB_DOEP_CTL_EPTYPE_SHIFT; + + if((eptype == _USB_DOEP_CTL_EPTYPE_BULK) || (eptype == _USB_DOEP_CTL_EPTYPE_INT)) + { + USB->DOEP[epnum - 1].CTL |= USB_DOEP_CTL_SETD0PIDEF; + } + } + } +} + +bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc) +{ + (void)rhport; + + uint8_t const epnum = tu_edpt_number(p_endpoint_desc->bEndpointAddress); + uint8_t const dir = tu_edpt_dir(p_endpoint_desc->bEndpointAddress); + + TU_ASSERT(p_endpoint_desc->wMaxPacketSize.size <= 64); + TU_ASSERT(epnum < EP_COUNT); + TU_ASSERT(epnum != 0); + + xfer_ctl_t *xfer = XFER_CTL_BASE(epnum, dir); + xfer->max_size = p_endpoint_desc->wMaxPacketSize.size; + + if(dir == TUSB_DIR_OUT) + { + USB->DOEP[epnum - 1].CTL |= USB_DOEP_CTL_USBACTEP | + (p_endpoint_desc->bmAttributes.xfer << _USB_DOEP_CTL_EPTYPE_SHIFT) | + (p_endpoint_desc->wMaxPacketSize.size << _USB_DOEP_CTL_MPS_SHIFT); + USB->DAINTMSK |= (1 << (_USB_DAINTMSK_OUTEPMSK0_SHIFT + epnum)); + } + else + { + uint8_t fifo_num = get_free_fifo(); + TU_ASSERT(fifo_num != 0); + + USB->DIEP[epnum - 1].CTL &= ~(_USB_DIEP_CTL_TXFNUM_MASK | _USB_DIEP_CTL_EPTYPE_MASK | USB_DIEP_CTL_SETD0PIDEF | _USB_DIEP_CTL_MPS_MASK); + USB->DIEP[epnum - 1].CTL |= USB_DIEP_CTL_USBACTEP | + (fifo_num << _USB_DIEP_CTL_TXFNUM_SHIFT) | + (p_endpoint_desc->bmAttributes.xfer << _USB_DIEP_CTL_EPTYPE_SHIFT) | + ((p_endpoint_desc->bmAttributes.xfer != TUSB_XFER_ISOCHRONOUS) ? USB_DIEP_CTL_SETD0PIDEF : 0) | + (p_endpoint_desc->wMaxPacketSize.size << 0); + + USB->DAINTMSK |= (1 << epnum); + + /* Both TXFD and TXSA are in unit of 32-bit words. */ + /* IN FIFO 0 was configured during enumeration, hence the "+ 16". */ + uint16_t const allocated_size = (USB->GRXFSIZ & _USB_GRXFSIZ_RXFDEP_MASK) + 16; + uint16_t const fifo_size = (EP_FIFO_SIZE/4 - allocated_size) / (EP_FIFO_NUM-1); + uint32_t const fifo_offset = allocated_size + fifo_size*(fifo_num-1); + + /* DIEPTXF starts at FIFO #1. */ + volatile uint32_t* usb_dieptxf = &USB->DIEPTXF1; + usb_dieptxf[epnum - 1] = (fifo_size << _USB_DIEPTXF1_INEPNTXFDEP_SHIFT) | fifo_offset; + } + return true; +} + +bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, uint16_t total_bytes) +{ + (void)rhport; + + uint8_t const epnum = tu_edpt_number(ep_addr); + uint8_t const dir = tu_edpt_dir(ep_addr); + + xfer_ctl_t * xfer = XFER_CTL_BASE(epnum, dir); + xfer->buffer = buffer; + xfer->total_len = total_bytes; + xfer->queued_len = 0; + xfer->short_packet = false; + + uint16_t num_packets = (total_bytes / xfer->max_size); + uint8_t short_packet_size = total_bytes % xfer->max_size; + + // Zero-size packet is special case. + if(short_packet_size > 0 || (total_bytes == 0)) + { + num_packets++; + } + + // IN and OUT endpoint xfers are interrupt-driven, we just schedule them + // here. + if(dir == TUSB_DIR_IN) + { + if(epnum == 0) + { + // A full IN transfer (multiple packets, possibly) triggers XFRC. + USB->DIEP0TSIZ = (num_packets << _USB_DIEP0TSIZ_PKTCNT_SHIFT) | total_bytes; + USB->DIEP0CTL |= USB_DIEP0CTL_EPENA | USB_DIEP0CTL_CNAK; // Enable | CNAK + } + else + { + // A full IN transfer (multiple packets, possibly) triggers XFRC. + USB->DIEP[epnum - 1].TSIZ = (num_packets << _USB_DIEP_TSIZ_PKTCNT_SHIFT) | total_bytes; + USB->DIEP[epnum - 1].CTL |= USB_DIEP_CTL_EPENA | USB_DIEP_CTL_CNAK; // Enable | CNAK + } + + // Enable fifo empty interrupt only if there are something to put in the fifo. + if(total_bytes != 0) + { + USB->DIEPEMPMSK |= (1 << epnum); + } + } + else + { + if(epnum == 0) + { + // A full IN transfer (multiple packets, possibly) triggers XFRC. + USB->DOEP0TSIZ |= (1 << _USB_DOEP0TSIZ_PKTCNT_SHIFT) | ((xfer->max_size & _USB_DOEP0TSIZ_XFERSIZE_MASK) << _USB_DOEP0TSIZ_XFERSIZE_SHIFT); + USB->DOEP0CTL |= USB_DOEP0CTL_EPENA | USB_DOEP0CTL_CNAK; + } + else + { + // A full IN transfer (multiple packets, possibly) triggers XFRC. + USB->DOEP[epnum - 1].TSIZ |= (1 << _USB_DOEP_TSIZ_PKTCNT_SHIFT) | ((xfer->max_size & _USB_DOEP_TSIZ_XFERSIZE_MASK) << _USB_DOEP_TSIZ_XFERSIZE_SHIFT); + USB->DOEP[epnum - 1].CTL |= USB_DOEP_CTL_EPENA | USB_DOEP_CTL_CNAK; + } + } + return true; +} + +/*------------------------------------------------------------------*/ +/* IRQ */ +/*------------------------------------------------------------------*/ +void dcd_int_enable(uint8_t rhport) +{ + (void) rhport; + + NVIC_EnableIRQ(USB_IRQn); +} + +void dcd_int_disable(uint8_t rhport) +{ + (void) rhport; + + NVIC_DisableIRQ(USB_IRQn); +} + +static void receive_packet(xfer_ctl_t *xfer, uint16_t xfer_size) +{ + uint16_t remaining = xfer->total_len - xfer->queued_len; + uint16_t to_recv_size; + + if(remaining <= xfer->max_size) + { + /* Avoid buffer overflow. */ + to_recv_size = (xfer_size > remaining) ? remaining : xfer_size; + } + else + { + /* Room for full packet, choose recv_size based on what the microcontroller claims. */ + to_recv_size = (xfer_size > xfer->max_size) ? xfer->max_size : xfer_size; + } + + uint8_t to_recv_rem = to_recv_size % 4; + uint16_t to_recv_size_aligned = to_recv_size - to_recv_rem; + + /* Do not assume xfer buffer is aligned. */ + uint8_t *base = (xfer->buffer + xfer->queued_len); + + /* This for loop always runs at least once- skip if less than 4 bytes to collect. */ + if(to_recv_size >= 4) + { + for(uint16_t i = 0; i < to_recv_size_aligned; i += 4) + { + uint32_t tmp = (*USB->FIFO0D); + base[i] = tmp & 0x000000FF; + base[i + 1] = (tmp & 0x0000FF00) >> 8; + base[i + 2] = (tmp & 0x00FF0000) >> 16; + base[i + 3] = (tmp & 0xFF000000) >> 24; + } + } + + /* Do not read invalid bytes from RX FIFO. */ + if(to_recv_rem != 0) + { + uint32_t tmp = (*USB->FIFO0D); + uint8_t *last_32b_bound = base + to_recv_size_aligned; + + last_32b_bound[0] = tmp & 0x000000FF; + if(to_recv_rem > 1) + { + last_32b_bound[1] = (tmp & 0x0000FF00) >> 8; + } + if(to_recv_rem > 2) + { + last_32b_bound[2] = (tmp & 0x00FF0000) >> 16; + } + } + + xfer->queued_len += xfer_size; + + /* Per USB spec, a short OUT packet (including length 0) is always */ + /* indicative of the end of a transfer (at least for ctl, bulk, int). */ + xfer->short_packet = (xfer_size < xfer->max_size); +} + +static void transmit_packet(xfer_ctl_t *xfer, uint8_t fifo_num) +{ + uint16_t remaining; + if(fifo_num == 0) + { + remaining = (USB->DIEP0TSIZ & 0x7FFFFU) >> _USB_DIEP0TSIZ_XFERSIZE_SHIFT; + } + else + { + remaining = (USB->DIEP[fifo_num - 1].TSIZ & 0x7FFFFU) >> _USB_DIEP_TSIZ_XFERSIZE_SHIFT; + } + xfer->queued_len = xfer->total_len - remaining; + + uint16_t to_xfer_size = (remaining > xfer->max_size) ? xfer->max_size : remaining; + uint8_t to_xfer_rem = to_xfer_size % 4; + uint16_t to_xfer_size_aligned = to_xfer_size - to_xfer_rem; + + /* Buffer might not be aligned to 32b, so we need to force alignment by copying to a temp var. */ + uint8_t *base = (xfer->buffer + xfer->queued_len); + + /* This for loop always runs at least once- skip if less than 4 bytes to send off. */ + if(to_xfer_size >= 4) + { + for(uint16_t i = 0; i < to_xfer_size_aligned; i += 4) + { + uint32_t tmp = base[i] | (base[i + 1] << 8) | (base[i + 2] << 16) | (base[i + 3] << 24); + *tx_fifo[fifo_num] = tmp; + } + } + + /* Do not read beyond end of buffer if not divisible by 4. */ + if(to_xfer_rem != 0) + { + uint32_t tmp = 0; + uint8_t *last_32b_bound = base + to_xfer_size_aligned; + + tmp |= last_32b_bound[0]; + if(to_xfer_rem > 1) + { + tmp |= (last_32b_bound[1] << 8); + } + if(to_xfer_rem > 2) + { + tmp |= (last_32b_bound[2] << 16); + } + + *tx_fifo[fifo_num] = tmp; + } +} + +static void read_rx_fifo(void) +{ + /* + * Pop control word off FIFO (completed xfers will have 2 control words, + * we only pop one ctl word each interrupt). + */ + uint32_t const ctl_word = USB->GRXSTSP; + uint8_t const pktsts = (ctl_word & _USB_GRXSTSP_PKTSTS_MASK) >> _USB_GRXSTSP_PKTSTS_SHIFT; + uint8_t const epnum = (ctl_word & _USB_GRXSTSP_CHNUM_MASK ) >> _USB_GRXSTSP_CHNUM_SHIFT; + uint16_t const bcnt = (ctl_word & _USB_GRXSTSP_BCNT_MASK ) >> _USB_GRXSTSP_BCNT_SHIFT; + + switch(pktsts) + { + case 0x01: /* Global OUT NAK (Interrupt) */ + break; + + case 0x02: + { + /* Out packet recvd */ + xfer_ctl_t *xfer = XFER_CTL_BASE(epnum, TUSB_DIR_OUT); + receive_packet(xfer, bcnt); + } + break; + + case 0x03: + /* Out packet done (Interrupt) */ + break; + + case 0x04: + /* Step 2: Setup transaction completed (Interrupt) */ + /* After this event, OEPINT interrupt will occur with SETUP bit set */ + if(epnum == 0) + { + USB->DOEP0TSIZ |= (1 << _USB_DOEP0TSIZ_SUPCNT_SHIFT); + } + + break; + + case 0x06: + { + /* Step1: Setup data packet received */ + + /* + * We can receive up to three setup packets in succession, but + * only the last one is valid. Therefore we just overwrite it + */ + _setup_packet[0] = (*USB->FIFO0D); + _setup_packet[1] = (*USB->FIFO0D); + } + break; + + default: + /* Invalid, breakpoint. */ + TU_BREAKPOINT(); + break; + } +} + +static void handle_epout_ints(void) +{ + // GINTSTS will be cleared with DAINT == 0 + // DAINT for a given EP clears when DOEPINTx is cleared. + // DOEPINT will be cleared when DAINT's out bits are cleared. + + for(uint8_t n = 0; n < EP_COUNT; n++) + { + xfer_ctl_t *xfer = XFER_CTL_BASE(n, TUSB_DIR_OUT); + + if(n == 0) + { + if(USB->DAINT & (1 << (_USB_DAINT_OUTEPINT0_SHIFT + n))) + { + // SETUP packet Setup Phase done. + if((USB->DOEP0INT & USB_DOEP0INT_SETUP)) + { + USB->DOEP0INT = USB_DOEP0INT_STUPPKTRCVD | USB_DOEP0INT_SETUP; // clear + dcd_event_setup_received(0, (uint8_t *)&_setup_packet[0], true); + } + + // OUT XFER complete (single packet).q + if(USB->DOEP0INT & USB_DOEP0INT_XFERCOMPL) + { + USB->DOEP0INT = USB_DOEP0INT_XFERCOMPL; + + // Transfer complete if short packet or total len is transferred + if(xfer->short_packet || (xfer->queued_len == xfer->total_len)) + { + xfer->short_packet = false; + dcd_event_xfer_complete(0, n, xfer->queued_len, XFER_RESULT_SUCCESS, true); + } + else + { + // Schedule another packet to be received. + USB->DOEP0TSIZ |= (1 << _USB_DOEP0TSIZ_PKTCNT_SHIFT) | ((xfer->max_size & _USB_DOEP0TSIZ_XFERSIZE_MASK) << _USB_DOEP0TSIZ_XFERSIZE_SHIFT); + USB->DOEP0CTL |= USB_DOEP0CTL_EPENA | USB_DOEP0CTL_CNAK; + } + } + } + } + else + { + if(USB->DAINT & (1 << (_USB_DAINT_OUTEPINT0_SHIFT + n))) + { + // SETUP packet Setup Phase done. + if((USB->DOEP[n - 1].INT & USB_DOEP_INT_SETUP)) + { + USB->DOEP[n - 1].INT = USB_DOEP_INT_STUPPKTRCVD | USB_DOEP_INT_SETUP; // clear + dcd_event_setup_received(0, (uint8_t *)&_setup_packet[0], true); + } + + // OUT XFER complete (single packet).q + if(USB->DOEP[n - 1].INT & USB_DOEP_INT_XFERCOMPL) + { + USB->DOEP[n - 1].INT = USB_DOEP_INT_XFERCOMPL; + + // Transfer complete if short packet or total len is transferred + if(xfer->short_packet || (xfer->queued_len == xfer->total_len)) + { + xfer->short_packet = false; + dcd_event_xfer_complete(0, n, xfer->queued_len, XFER_RESULT_SUCCESS, true); + } + else + { + // Schedule another packet to be received. + USB->DOEP[n - 1].TSIZ |= (1 << _USB_DOEP_TSIZ_PKTCNT_SHIFT) | ((xfer->max_size & _USB_DOEP_TSIZ_XFERSIZE_MASK) << _USB_DOEP_TSIZ_XFERSIZE_SHIFT); + USB->DOEP[n - 1].CTL |= USB_DOEP_CTL_EPENA | USB_DOEP_CTL_CNAK; + } + } + } + } + } +} + +static void handle_epin_ints(void) +{ + + for(uint32_t n = 0; n < EP_COUNT; n++) + { + xfer_ctl_t *xfer = &xfer_status[n][TUSB_DIR_IN]; + + if(n == 0) + { + if(USB->DAINT & (1 << n)) + { + /* IN XFER complete (entire xfer). */ + if(USB->DIEP0INT & USB_DIEP0INT_XFERCOMPL) + { + USB->DIEP0INT = USB_DIEP0INT_XFERCOMPL; + dcd_event_xfer_complete(0, n | TUSB_DIR_IN_MASK, xfer->total_len, XFER_RESULT_SUCCESS, true); + } + + /* XFER FIFO empty */ + if(USB->DIEP0INT & USB_DIEP0INT_TXFEMP) + { + USB->DIEP0INT = USB_DIEP0INT_TXFEMP; + transmit_packet(xfer, n); + + /* Turn off TXFE if all bytes are written. */ + if(xfer->queued_len == xfer->total_len) + { + USB->DIEPEMPMSK &= ~(1 << n); + } + } + + /* XFER Timeout */ + if(USB->DIEP0INT & USB_DIEP0INT_TIMEOUT) + { + /* Clear interrupt or enpoint will hang. */ + USB->DIEP0INT = USB_DIEP0INT_TIMEOUT; + } + } + } + else + { + if(USB->DAINT & (1 << n)) + { + /* IN XFER complete (entire xfer). */ + if(USB->DIEP[n - 1].INT & USB_DIEP_INT_XFERCOMPL) + { + USB->DIEP[n - 1].INT = USB_DIEP_INT_XFERCOMPL; + dcd_event_xfer_complete(0, n | TUSB_DIR_IN_MASK, xfer->total_len, XFER_RESULT_SUCCESS, true); + } + + /* XFER FIFO empty */ + if(USB->DIEP[n - 1].INT & USB_DIEP_INT_TXFEMP) + { + USB->DIEP[n - 1].INT = USB_DIEP_INT_TXFEMP; + transmit_packet(xfer, n); + + /* Turn off TXFE if all bytes are written. */ + if(xfer->queued_len == xfer->total_len) + { + USB->DIEPEMPMSK &= ~(1 << n); + } + } + + /* XFER Timeout */ + if(USB->DIEP[n - 1].INT & USB_DIEP_INT_TIMEOUT) + { + /* Clear interrupt or enpoint will hang. */ + USB->DIEP[n - 1].INT = USB_DIEP_INT_TIMEOUT; + } + } + } + } +} + +void dcd_int_handler(uint8_t rhport) +{ + (void) rhport; + + const uint32_t int_status = USB->GINTSTS; + + /* USB Reset */ + if(int_status & USB_GINTSTS_USBRST) + { + /* start of reset */ + USB->GINTSTS = USB_GINTSTS_USBRST; + /* FIFOs will be reassigned when the endpoints are reopen */ + _allocated_fifos = 1; + bus_reset(); + } + + /* Reset detected Interrupt */ + if(int_status & USB_GINTSTS_RESETDET) + { + USB->GINTSTS = USB_GINTSTS_RESETDET; + bus_reset(); + } + + /* Enumeration Done */ + if(int_status & USB_GINTSTS_ENUMDONE) + { + /* This interrupt is considered the end of reset. */ + USB->GINTSTS = USB_GINTSTS_ENUMDONE; + enum_done_processing(); + dcd_event_bus_signal(0, DCD_EVENT_BUS_RESET, true); + } + + /* OTG Interrupt */ + if(int_status & USB_GINTSTS_OTGINT) + { + /* OTG INT bit is read-only */ + + uint32_t const otg_int = USB->GOTGINT; + + if(otg_int & USB_GOTGINT_SESENDDET) + { + dcd_event_bus_signal(0, DCD_EVENT_UNPLUGGED, true); + } + + USB->GOTGINT = otg_int; + } + + #if USE_SOF + if(int_status & USB_GINTSTS_SOF) + { + USB->GINTSTS = USB_GINTSTS_SOF; + dcd_event_bus_signal(0, DCD_EVENT_SOF, true); + } + #endif + + /* RxFIFO Non-Empty */ + if(int_status & USB_GINTSTS_RXFLVL) + { + /* RXFLVL bit is read-only */ + + /* Mask out RXFLVL while reading data from FIFO */ + USB->GINTMSK &= ~USB_GINTMSK_RXFLVLMSK; + read_rx_fifo(); + USB->GINTMSK |= USB_GINTMSK_RXFLVLMSK; + } + + /* OUT Endpoints Interrupt */ + if(int_status & USB_GINTMSK_OEPINTMSK) + { + /* OEPINT is read-only */ + handle_epout_ints(); + } + + /* IN Endpoints Interrupt */ + if(int_status & USB_GINTMSK_IEPINTMSK) + { + /* IEPINT bit read-only */ + handle_epin_ints(); + } + + /* unhandled */ + USB->GINTSTS |= USB_GINTSTS_CURMOD | + USB_GINTSTS_MODEMIS | + USB_GINTSTS_OTGINT | + USB_GINTSTS_NPTXFEMP | + USB_GINTSTS_GINNAKEFF | + USB_GINTSTS_GOUTNAKEFF | + USB_GINTSTS_ERLYSUSP | + USB_GINTSTS_USBSUSP | + USB_GINTSTS_ISOOUTDROP | + USB_GINTSTS_EOPF | + USB_GINTSTS_EPMIS | + USB_GINTSTS_INCOMPISOIN | + USB_GINTSTS_INCOMPLP | + USB_GINTSTS_FETSUSP | + USB_GINTSTS_PTXFEMP; +} + +#endif From 18be454011eb29652b9e740f33b5b5677d50e7b7 Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Fri, 5 Mar 2021 01:38:49 +0900 Subject: [PATCH 34/72] added board files --- hw/bsp/gr_citrus/board.mk | 54 +++++++++ hw/bsp/gr_citrus/gr_citrus.c | 217 ++++++++++++++++++++++++++++++++++ hw/bsp/gr_citrus/hwinit.c | 31 +++++ hw/bsp/gr_citrus/r5f5631fd.ld | 127 ++++++++++++++++++++ 4 files changed, 429 insertions(+) create mode 100644 hw/bsp/gr_citrus/board.mk create mode 100644 hw/bsp/gr_citrus/gr_citrus.c create mode 100644 hw/bsp/gr_citrus/hwinit.c create mode 100644 hw/bsp/gr_citrus/r5f5631fd.ld diff --git a/hw/bsp/gr_citrus/board.mk b/hw/bsp/gr_citrus/board.mk new file mode 100644 index 00000000..8675d853 --- /dev/null +++ b/hw/bsp/gr_citrus/board.mk @@ -0,0 +1,54 @@ +CFLAGS += \ + -nostartfiles \ + -nostdinc \ + -ffunction-sections \ + -fdata-sections \ + -mcpu=rx610 \ + -misa=v1 \ + -mlittle-endian-data \ + -DCFG_TUSB_MCU=OPT_MCU_RX63X + +# Cross Compiler for RX +CROSS_COMPILE = rx-elf- + +ifeq ($(CMDEXE),1) +OPTLIBINC="$(shell for /F "usebackq delims=" %%i in (`where rx-elf-gcc`) do echo %%~dpi..\rx-elf\optlibinc)" +else +OPTLIBINC=$(shell dirname `which rx-elf-gcc`)../rx-elf/optlibinc +endif + +# mcu driver cause following warnings +CFLAGS += -isystem $(OPTLIBINC) + +LIBS += -loptm -loptc + +MCU_DIR = hw/mcu/renesas/rx63n + +# All source paths should be relative to the top level. +LD_FILE = hw/bsp/$(BOARD)/r5f5631fd.ld + +SRC_C += \ + $(MCU_DIR)/vects.c + +INC += \ + $(TOP)/hw/bsp/$(BOARD) \ + $(TOP)/$(MCU_DIR) + +SRC_S += $(MCU_DIR)/start.S + +# For TinyUSB port source +VENDOR = renesas +CHIP_FAMILY = usba + +# For freeRTOS port source +FREERTOS_PORT = RX600 + +# For flash-jlink target +JLINK_DEVICE = R5F5631F +JLINK_IF = JTAG + +# For flash-pyocd target +PYOCD_TARGET = + +# flash using jlink +flash: flash-jlink diff --git a/hw/bsp/gr_citrus/gr_citrus.c b/hw/bsp/gr_citrus/gr_citrus.c new file mode 100644 index 00000000..3fa568cc --- /dev/null +++ b/hw/bsp/gr_citrus/gr_citrus.c @@ -0,0 +1,217 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2021, Koji Kitayama + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * This file is part of the TinyUSB stack. + */ + +#include "../board.h" +#include "iodefine.h" +#include "interrupt_handlers.h" + +#define IRQ_PRIORITY_CMT0 5 +#define IRQ_PRIORITY_USBI0 5 +#define IRQ_PRIORITY_SCI0 5 + +#define SYSTEM_PRCR_PRC1 (1<<1) +#define SYSTEM_PRCR_PRKEY (0xA5u<<8) + +#define CMT_PCLK 48000000 +#define CMT_CMCR_CKS_DIV_128 2 +#define CMT_CMCR_CMIE (1<<6) +#define MPC_PFS_ISEL (1<<6) + +#define SCI_PCLK 48000000 +#define SCI_SSR_FER (1<<4) +#define SCI_SSR_ORER (1<<5) + +#define SCI_SCR_TEIE (1u<<2) +#define SCI_SCR_RE (1u<<4) +#define SCI_SCR_TE (1u<<5) +#define SCI_SCR_RIE (1u<<6) +#define SCI_SCR_TIE (1u<<7) + +//--------------------------------------------------------------------+ +// SCI0 handling +//--------------------------------------------------------------------+ +typedef struct { + uint8_t *buf; + uint32_t cnt; +} sci_buf_t; +static volatile sci_buf_t sci0_buf[2]; + +void INT_Excep_SCI0_TXI0(void) +{ + uint8_t *buf = sci0_buf[0].buf; + uint32_t cnt = sci0_buf[0].cnt; + + if (!buf || !cnt) { + SCI0.SCR.BYTE &= ~(SCI_SCR_TEIE | SCI_SCR_TE | SCI_SCR_TIE); + return; + } + SCI0.TDR = *buf; + if (--cnt) { + ++buf; + } else { + buf = NULL; + SCI0.SCR.BIT.TIE = 0; + SCI0.SCR.BIT.TEIE = 1; + } + sci0_buf[0].buf = buf; + sci0_buf[0].cnt = cnt; +} + +void INT_Excep_SCI0_TEI0(void) +{ + SCI0.SCR.BYTE &= ~(SCI_SCR_TEIE | SCI_SCR_TE | SCI_SCR_TIE); +} + +void INT_Excep_SCI0_RXI0(void) +{ + uint8_t *buf = sci0_buf[1].buf; + uint32_t cnt = sci0_buf[1].cnt; + + if (!buf || !cnt || + (SCI0.SSR.BYTE & (SCI_SSR_FER | SCI_SSR_ORER))) { + sci0_buf[1].buf = NULL; + SCI0.SSR.BYTE = 0; + SCI0.SCR.BYTE &= ~(SCI_SCR_RE | SCI_SCR_RIE); + return; + } + *buf = SCI0.RDR; + if (--cnt) { + ++buf; + } else { + buf = NULL; + SCI0.SCR.BYTE &= ~(SCI_SCR_RE | SCI_SCR_RIE); + } + sci0_buf[1].buf = buf; + sci0_buf[1].cnt = cnt; +} + +//--------------------------------------------------------------------+ +// Forward USB interrupt events to TinyUSB IRQ Handler +//--------------------------------------------------------------------+ +void INT_Excep_USB0_USBI0(void) +{ + tud_int_handler(0); +} + +void board_init(void) +{ +#if CFG_TUSB_OS == OPT_OS_NONE + /* Enable CMT0 */ + SYSTEM.PRCR.WORD = SYSTEM_PRCR_PRKEY | SYSTEM_PRCR_PRC1; + MSTP(CMT0) = 0; + SYSTEM.PRCR.WORD = SYSTEM_PRCR_PRKEY; + /* Setup 1ms tick timer */ + CMT0.CMCNT = 0; + CMT0.CMCOR = CMT_PCLK / 1000 / 128; + CMT0.CMCR.WORD = CMT_CMCR_CMIE | CMT_CMCR_CKS_DIV_128; + IR(CMT0, CMI0) = 0; + IPR(CMT0, CMI0) = IRQ_PRIORITY_CMT0; + IEN(CMT0, CMI0) = 1; + CMT.CMSTR0.BIT.STR0 = 1; +#endif + + /* Unlock MPC registers */ + MPC.PWPR.BIT.B0WI = 0; + MPC.PWPR.BIT.PFSWE = 1; + /* LED PA0 */ + PORTA.PMR.BIT.B0 = 0U; + PORTA.PODR.BIT.B0 = 0U; + PORTA.PDR.BIT.B0 = 1U; + /* UART TXD0 => P20, RXD0 => P21 */ + PORT2.PMR.BIT.B0 = 1U; + PORT2.PCR.BIT.B0 = 1U; + MPC.P20PFS.BYTE = 0b01010; + PORT2.PMR.BIT.B1 = 1U; + MPC.P21PFS.BYTE = 0b01010; + /* USB VBUS -> P16, RXD0 => P21, TXD0 => P20 */ + PORT1.PMR.BIT.B6 = 1U; + MPC.P16PFS.BYTE = MPC_PFS_ISEL | 0b10001; + /* Lock MPC registers */ + MPC.PWPR.BIT.PFSWE = 0; + MPC.PWPR.BIT.B0WI = 1; + + IPR(USB0, USBI0) = IRQ_PRIORITY_USBI0; + + /* Enable SCI0 */ + SYSTEM.PRCR.WORD = SYSTEM_PRCR_PRKEY | SYSTEM_PRCR_PRC1; + MSTP(SCI0) = 0; + SYSTEM.PRCR.WORD = SYSTEM_PRCR_PRKEY; + SCI0.BRR = (SCI_PCLK / (32 * 115200)) - 1; + IR(SCI0, RXI0) = 0; + IR(SCI0, TXI0) = 0; + IR(SCI0, TEI0) = 0; + IPR(SCI0, RXI0) = IRQ_PRIORITY_SCI0; + IPR(SCI0, TXI0) = IRQ_PRIORITY_SCI0; + IPR(SCI0, TEI0) = IRQ_PRIORITY_SCI0; + IEN(SCI0, RXI0) = 1; + IEN(SCI0, TXI0) = 1; + IEN(SCI0, TEI0) = 1; +} + +//--------------------------------------------------------------------+ +// Board porting API +//--------------------------------------------------------------------+ + +void board_led_write(bool state) +{ + PORTA.PODR.BIT.B0 = state ? 1 : 0; +} + +uint32_t board_button_read(void) +{ + return 0; +} + +int board_uart_read(uint8_t* buf, int len) +{ + sci0_buf[1].buf = buf; + sci0_buf[1].cnt = len; + SCI0.SCR.BYTE |= SCI_SCR_RE | SCI_SCR_RIE; + while (SCI0.SCR.BIT.RE) ; + return len - sci0_buf[1].cnt; +} + +int board_uart_write(void const *buf, int len) +{ + sci0_buf[0].buf = (uint8_t*)buf; + sci0_buf[0].cnt = len; + SCI0.SCR.BYTE |= SCI_SCR_TE | SCI_SCR_TIE; + while (SCI0.SCR.BIT.TE) ; + return len; +} + +#if CFG_TUSB_OS == OPT_OS_NONE +volatile uint32_t system_ticks = 0; +void INT_Excep_CMT0_CMI0(void) +{ + ++system_ticks; +} + +uint32_t board_millis(void) +{ + return system_ticks; +} +#endif diff --git a/hw/bsp/gr_citrus/hwinit.c b/hw/bsp/gr_citrus/hwinit.c new file mode 100644 index 00000000..8245d774 --- /dev/null +++ b/hw/bsp/gr_citrus/hwinit.c @@ -0,0 +1,31 @@ +/************************************************************************/ +/* File Version: V1.00 */ +/* Date Generated: 08/07/2013 */ +/************************************************************************/ + +#include "iodefine.h" +#ifdef __cplusplus +extern "C" { +#endif +extern void HardwareSetup(void); +#ifdef __cplusplus +} +#endif + +void HardwareSetup(void) +{ + SYSTEM.PRCR.WORD = 0xA503u; + SYSTEM.SOSCCR.BYTE = 0x01u; + SYSTEM.MOSCWTCR.BYTE = 0x0Du; + SYSTEM.PLLWTCR.BYTE = 0x0Eu; + SYSTEM.PLLCR.WORD = 0x0F00u; + SYSTEM.MOSCCR.BYTE = 0x00u; + SYSTEM.PLLCR2.BYTE = 0x00u; + for (unsigned i = 0; i < 2075u; ++i) __asm("nop"); + SYSTEM.SCKCR.LONG = 0x21021211u; + SYSTEM.SCKCR2.WORD = 0x0033u; + SYSTEM.SCKCR3.WORD = 0x0400u; + SYSTEM.SYSCR0.WORD = 0x5A01; + SYSTEM.MSTPCRB.BIT.MSTPB15 = 0; + SYSTEM.PRCR.WORD = 0xA500u; +} diff --git a/hw/bsp/gr_citrus/r5f5631fd.ld b/hw/bsp/gr_citrus/r5f5631fd.ld new file mode 100644 index 00000000..166a9e7c --- /dev/null +++ b/hw/bsp/gr_citrus/r5f5631fd.ld @@ -0,0 +1,127 @@ +__USTACK_SIZE = 0x00000200; +__ISTACK_SIZE = 0x00000100; + +MEMORY +{ + RAM : ORIGIN = 0x4, LENGTH = 0x3fffc + ROM : ORIGIN = 0xFFE00000, LENGTH = 0x200000 +} +SECTIONS +{ + .fvectors 0xFFFFFF80: AT(0xFFFFFF80) + { + KEEP(*(.fvectors)) + } > ROM + .text 0xFFE00000: AT(0xFFE00000) + { + *(.text) + *(.text.*) + *(P) + etext = .; + } > ROM + .rvectors ALIGN(4): + { + _rvectors_start = .; + KEEP(*(.rvectors)) + _rvectors_end = .; + } > ROM + .init : + { + KEEP(*(.init)) + __preinit_array_start = .; + KEEP(*(.preinit_array)) + __preinit_array_end = .; + __init_array_start = (. + 3) & ~ 3; + KEEP(*(.init_array)) + KEEP(*(SORT(.init_array.*))) + __init_array_end = .; + __fini_array_start = .; + KEEP(*(.fini_array)) + KEEP(*(SORT(.fini_array.*))) + __fini_array_end = .; + } > ROM + .fini : + { + KEEP(*(.fini)) + } > ROM + .got : + { + *(.got) + *(.got.plt) + } > ROM + .rodata : + { + *(.rodata) + *(.rodata.*) + *(C_1) + *(C_2) + *(C) + _erodata = .; + } > ROM + .eh_frame_hdr : + { + *(.eh_frame_hdr) + } > ROM + .eh_frame : + { + *(.eh_frame) + } > ROM + .jcr : + { + *(.jcr) + } > ROM + .tors : + { + __CTOR_LIST__ = .; + . = ALIGN(2); + ___ctors = .; + *(.ctors) + ___ctors_end = .; + __CTOR_END__ = .; + __DTOR_LIST__ = .; + ___dtors = .; + *(.dtors) + ___dtors_end = .; + __DTOR_END__ = .; + . = ALIGN(2); + _mdata = .; + } > ROM + .data : AT(_mdata) + { + _data = .; + *(.data) + *(.data.*) + *(D) + *(D_1) + *(D_2) + _edata = .; + } > RAM + .gcc_exc : + { + *(.gcc_exc) + } > RAM + .bss : + { + _bss = .; + *(.bss) + *(.bss.**) + *(COMMON) + *(B) + *(B_1) + *(B_2) + _ebss = .; + _end = .; + } > RAM + .ustack (COPY) : + { + . = ALIGN(8); + . = . + __USTACK_SIZE; + PROVIDE(_ustack = .); + } > RAM + .istack (COPY) : + { + . = ALIGN(8); + . = . + __ISTACK_SIZE; + PROVIDE(_istack = .); + } > RAM +} From 13735eb21de8d21a88871e69859f69db02af93c6 Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Sun, 7 Mar 2021 14:53:21 +0900 Subject: [PATCH 35/72] added dcd for Renesas USBa --- src/portable/renesas/usba/dcd_usba.c | 755 +++++++++++++++++++++++++++ 1 file changed, 755 insertions(+) create mode 100644 src/portable/renesas/usba/dcd_usba.c diff --git a/src/portable/renesas/usba/dcd_usba.c b/src/portable/renesas/usba/dcd_usba.c new file mode 100644 index 00000000..b0fa1749 --- /dev/null +++ b/src/portable/renesas/usba/dcd_usba.c @@ -0,0 +1,755 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2020 Koji Kitayama + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * This file is part of the TinyUSB stack. + */ + +#include "tusb_option.h" + +#if TUSB_OPT_DEVICE_ENABLED && ( CFG_TUSB_MCU == OPT_MCU_RX63X ) + +#include "device/dcd.h" +#include "iodefine.h" + +//--------------------------------------------------------------------+ +// MACRO TYPEDEF CONSTANT ENUM DECLARATION +//--------------------------------------------------------------------+ +#define SYSTEM_PRCR_PRC1 (1<<1) +#define SYSTEM_PRCR_PRKEY (0xA5u<<8) + +#define USB_FIFOSEL_TX ((uint16_t)(1u<<5)) +#define USB_FIFOSEL_MBW_8 ((uint16_t)(0u<<10)) +#define USB_FIFOSEL_MBW_16 ((uint16_t)(1u<<10)) +#define USB_IS0_CTSQ ((uint16_t)(7u)) +#define USB_IS0_DVSQ ((uint16_t)(7u<<4)) +#define USB_IS0_VALID ((uint16_t)(1u<<3)) +#define USB_IS0_BRDY ((uint16_t)(1u<<8)) +#define USB_IS0_NRDY ((uint16_t)(1u<<9)) +#define USB_IS0_BEMP ((uint16_t)(1u<<10)) +#define USB_IS0_CTRT ((uint16_t)(1u<<11)) +#define USB_IS0_DVST ((uint16_t)(1u<<12)) +#define USB_IS0_SOFR ((uint16_t)(1u<<13)) +#define USB_IS0_RESM ((uint16_t)(1u<<14)) +#define USB_IS0_VBINT ((uint16_t)(1u<<15)) +#define USB_IS1_SACK ((uint16_t)(1u<<4)) +#define USB_IS1_SIGN ((uint16_t)(1u<<5)) +#define USB_IS1_EOFERR ((uint16_t)(1u<<6)) +#define USB_IS1_ATTCH ((uint16_t)(1u<<11)) +#define USB_IS1_DTCH ((uint16_t)(1u<<12)) +#define USB_IS1_BCHG ((uint16_t)(1u<<14)) +#define USB_IS1_OVRCR ((uint16_t)(1u<<15)) + +#define USB_IS0_CTSQ_MSK (7u) +#define USB_IS0_CTSQ_SETUP (1u) +#define USB_IS0_DVSQ_DEF (1u<<4) +#define USB_IS0_DVSQ_ADDR (2u<<4) +#define USB_IS0_DVSQ_SUSP (4u<<4) + +#define USB_PIPECTR_PID_NAK (0u) +#define USB_PIPECTR_PID_BUF (1u) +#define USB_PIPECTR_PID_STALL (2u) +#define USB_PIPECTR_CCPL (1u<<2) +#define USB_PIPECTR_SQMON (1u<<6) +#define USB_PIPECTR_SQCLR (1u<<8) +#define USB_PIPECTR_ACLRM (1u<<9) +#define USB_PIPECTR_BSTS (1u<<15) + +#define USB_FIFOCTR_DTLN (0x1FF) +#define USB_FIFOCTR_FRDY (1u<<13) +#define USB_FIFOCTR_BCLR (1u<<14) +#define USB_FIFOCTR_BVAL (1u<<15) + +#define USB_PIPECFG_SHTNAK (1u<<7) +#define USB_PIPECFG_DBLB (1u<<9) +#define USB_PIPECFG_BULK (1u<<14) +#define USB_PIPECFG_ISO (3u<<14) +#define USB_PIPECFG_INT (2u<<14) + +#define FIFO_REQ_CLR (1u) +#define FIFO_COMPLETE (1u<<1) + +typedef struct { + union { + struct { + uint16_t : 8; + uint16_t TRCLR: 1; + uint16_t TRENB: 1; + uint16_t : 0; + }; + uint16_t TRE; + }; + uint16_t TRN; +} reg_pipetre_t; + +typedef union { + struct { + volatile uint16_t u8: 8; + volatile uint16_t : 0; + }; + volatile uint16_t u16; +} hw_fifo_t; + +typedef struct TU_ATTR_PACKED +{ + uintptr_t addr; + uint16_t length; + uint16_t remaining; + struct { + uint32_t ep : 8; + uint32_t data: 1; + uint32_t : 0; + }; +} pipe_state_t; + +typedef struct +{ + pipe_state_t pipe[9]; + uint8_t ep[2][16]; /* index for pipe number */ +} dcd_data_t; + +//--------------------------------------------------------------------+ +// INTERNAL OBJECT & FUNCTION DECLARATION +//--------------------------------------------------------------------+ +CFG_TUSB_MEM_SECTION static dcd_data_t _dcd; + +static uint32_t disable_interrupt(void) +{ + uint32_t pswi; + pswi = __builtin_rx_mvfc(0) & 0x010000; + __builtin_rx_clrpsw('I'); + return pswi; +} + +static void enable_interrupt(uint32_t pswi) +{ + __builtin_rx_mvtc(0, __builtin_rx_mvfc(0) | pswi); +} + +static unsigned find_pipe(unsigned xfer) +{ + switch (xfer) { + case TUSB_XFER_ISOCHRONOUS: + for (int i = 1; i <= 2; ++i) { + if (0 == _dcd.pipe[i].ep) return i; + } + break; + case TUSB_XFER_BULK: + for (int i = 3; i <= 5; ++i) { + if (0 == _dcd.pipe[i].ep) return i; + } + for (int i = 1; i <= 1; ++i) { + if (0 == _dcd.pipe[i].ep) return i; + } + break; + case TUSB_XFER_INTERRUPT: + for (int i = 6; i <= 9; ++i) { + if (0 == _dcd.pipe[i].ep) return i; + } + break; + default: + /* No support for control transfer */ + break; + } + return 0; +} + +static volatile uint16_t* get_pipectr(unsigned num) +{ + volatile uint16_t *ctr = NULL; + if (num) { + ctr = (volatile uint16_t*)&USB0.PIPE1CTR.WORD; + ctr += num - 1; + } else { + ctr = (volatile uint16_t*)&USB0.DCPCTR.WORD; + } + return ctr; +} + +static volatile reg_pipetre_t* get_pipetre(unsigned num) +{ + volatile reg_pipetre_t* tre = NULL; + if ((1 <= num) && (num <= 5)) { + tre = (volatile reg_pipetre_t*)&USB0.PIPE1TRE.WORD; + tre += num - 1; + } + return tre; +} + +static volatile uint16_t* ep_addr_to_pipectr(uint8_t rhport, unsigned ep_addr) +{ + (void)rhport; + volatile uint16_t *ctr = NULL; + const unsigned epn = ep_addr & 0xFu; + if (epn) { + const unsigned dir = (ep_addr & TUSB_DIR_IN_MASK) ? TUSB_DIR_IN : TUSB_DIR_OUT; + const unsigned num = _dcd.ep[dir][epn]; + if (num) { + ctr = (volatile uint16_t*)&USB0.PIPE1CTR.WORD; + ctr += num - 1; + } + } else { + ctr = (volatile uint16_t*)&USB0.DCPCTR.WORD; + } + return ctr; +} + + +/* 1 less than 64 bytes were written + * 2 no bytes were written + * 0 64 bytes were written */ +static int write_fifo(volatile void *fifo, pipe_state_t* pipe, unsigned mps) +{ + unsigned rem = pipe->remaining; + if (!rem) return 2; + unsigned len = (rem < mps) ? rem: mps; + + hw_fifo_t *reg = (hw_fifo_t*)fifo; + uintptr_t addr = pipe->addr + pipe->length - rem; + if (addr & 1u) { + /* addr is not 2-byte aligned */ + reg->u8 = *(const uint8_t *)addr; + ++addr; + --len; + } + while (len >= 2) { + reg->u16 = *(const uint16_t *)addr; + addr += 2; + len -= 2; + } + if (len) { + reg->u8 = *(const uint8_t *)addr; + ++addr; + } + if (rem < mps) return 1; + return 0; +} + +/* 1 if the number of bytes read is less than 64 bytes + * 0 otherwise */ +static int read_fifo(volatile void *fifo, pipe_state_t* pipe, unsigned mps, size_t len) +{ + unsigned rem = pipe->remaining; + if (!rem) return 2; + if (rem < len) len = rem; + pipe->remaining = rem - len; + + hw_fifo_t *reg = (hw_fifo_t*)fifo; + uintptr_t addr = pipe->addr; + while (len--) { + *(uint8_t *)addr = reg->u8; + ++addr; + } + pipe->addr = addr; + if (rem < mps) return 1; + return 0; +} + +static void process_setup_packet(uint8_t rhport) +{ + uint16_t setup_packet[4]; + if (0 == (USB0.INTSTS0.WORD & USB_IS0_VALID)) return; + USB0.CFIFOCTR.WORD = USB_FIFOCTR_BCLR; + setup_packet[0] = USB0.USBREQ.WORD; + setup_packet[1] = USB0.USBVAL; + setup_packet[2] = USB0.USBINDX; + setup_packet[3] = USB0.USBLENG; + USB0.INTSTS0.WORD = ~USB_IS0_VALID; + dcd_event_setup_received(rhport, (const uint8_t*)&setup_packet[0], true); + // TU_LOG1("S\r\n"); +} + +static void process_status_completion(uint8_t rhport) +{ + uint8_t ep_addr; + /* Check the data stage direction */ + if (USB0.CFIFOSEL.WORD & USB_FIFOSEL_TX) { + /* IN transfer. */ + ep_addr = tu_edpt_addr(0, TUSB_DIR_IN); + } else { + /* OUT transfer. */ + ep_addr = tu_edpt_addr(0, TUSB_DIR_OUT); + } + dcd_event_xfer_complete(rhport, ep_addr, 0, XFER_RESULT_SUCCESS, true); + // TU_LOG1("C\r\n"); +} + +static bool process_edpt0_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, uint16_t total_bytes) +{ + (void)rhport; + + pipe_state_t *pipe = &_dcd.pipe[0]; + /* set fifo direction */ + if (ep_addr) { /* IN */ + USB0.CFIFOSEL.WORD = USB_FIFOSEL_TX | USB_FIFOSEL_MBW_16; + while (!(USB0.CFIFOSEL.WORD & USB_FIFOSEL_TX)) ; + } else { /* OUT */ + USB0.CFIFOSEL.WORD = USB_FIFOSEL_MBW_8; + while (USB0.CFIFOSEL.WORD & USB_FIFOSEL_TX) ; + } + if (total_bytes) { + pipe->addr = (uintptr_t)buffer; + pipe->length = total_bytes; + pipe->remaining = total_bytes; + pipe->data = USB0.DCPCTR.BIT.SQMON; + if (ep_addr) { /* IN */ + TU_ASSERT(USB0.DCPCTR.BIT.BSTS && (USB0.USBREQ.WORD & 0x80)); + if (write_fifo(&USB0.CFIFO.WORD, pipe, 64)) { + USB0.CFIFOCTR.WORD = USB_FIFOCTR_BVAL; + } + } + USB0.DCPCTR.WORD = USB_PIPECTR_PID_BUF; + // TU_LOG1("X %x %d\r\n", ep_addr, total_bytes); + } else { + /* ZLP */ + pipe->addr = 0; + pipe->length = 0; + pipe->remaining = 0; + pipe->data = USB0.DCPCTR.BIT.SQMON; + USB0.DCPCTR.WORD = USB_PIPECTR_CCPL | USB_PIPECTR_PID_BUF; + // TU_LOG1("Z %x\r\n", USB0.DCPCTR.WORD); + } + return true; +} + +static void process_edpt0_bemp(uint8_t rhport) +{ + pipe_state_t *pipe = &_dcd.pipe[0]; + unsigned data = pipe->data; + if (USB0.DCPCTR.BIT.SQMON == data) { + TU_LOG1("W %x\r\n", USB0.DCPCTR.WORD); + /* retry transfer */ + int r = write_fifo(&USB0.CFIFO.WORD, &_dcd.pipe[0], 64); + if (r) USB0.CFIFOCTR.WORD = USB_FIFOCTR_BVAL; + return; + } + const unsigned rem = pipe->remaining; + if (rem > 64) { + pipe->remaining = rem - 64; + pipe->data = data ^ 1; + TU_LOG1("Y %d %x\r\n", rem - 64, USB0.DCPCTR.WORD); + int r = write_fifo(&USB0.CFIFO.WORD, &_dcd.pipe[0], 64); + if (r) USB0.CFIFOCTR.WORD = USB_FIFOCTR_BVAL; + return; + } + pipe->addr = 0; + pipe->remaining = 0; + dcd_event_xfer_complete(rhport, tu_edpt_addr(0, TUSB_DIR_IN), + pipe->length, XFER_RESULT_SUCCESS, true); + // TU_LOG1("c\r\n"); +} + +static void process_edpt0_brdy(uint8_t rhport) +{ + size_t len = USB0.CFIFOCTR.BIT.DTLN; + int cplt = read_fifo(&USB0.CFIFO.WORD, &_dcd.pipe[0], 64, len); + if (cplt || (len < 64)) { + if (2 != cplt) { + USB0.CFIFOCTR.WORD = USB_FIFOCTR_BCLR; + } + dcd_event_xfer_complete(rhport, tu_edpt_addr(0, TUSB_DIR_OUT), + _dcd.pipe[0].length - _dcd.pipe[0].remaining, + XFER_RESULT_SUCCESS, true); + // TU_LOG1("c\r\n"); + } +} + +static bool process_pipe_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, uint16_t total_bytes) +{ + (void)rhport; + + const unsigned epn = ep_addr & 0xFu; + const unsigned dir = (ep_addr & TUSB_DIR_IN_MASK) ? TUSB_DIR_IN : TUSB_DIR_OUT; + const unsigned num = _dcd.ep[dir][epn]; + + TU_ASSERT(num); + + pipe_state_t *pipe = &_dcd.pipe[num]; + pipe->addr = (uintptr_t)buffer; + pipe->length = total_bytes; + pipe->remaining = total_bytes; + + USB0.PIPESEL.WORD = num; + const unsigned mps = USB0.PIPEMAXP.WORD; + if (dir) { /* IN */ + USB0.D0FIFOSEL.WORD = num | USB_FIFOSEL_MBW_16; + while (!(USB0.D0FIFOSEL.BIT.CURPIPE != num)) ; + if (write_fifo(&USB0.D0FIFO.WORD, pipe, mps)) { + USB0.D0FIFOCTR.WORD = USB_FIFOCTR_BVAL; + } + USB0.D0FIFOSEL.WORD = 0; + } else { + volatile reg_pipetre_t *pt = get_pipetre(num); + if (pt) { + volatile uint16_t *ctr = get_pipectr(num); + if (*ctr & 0x3) *ctr = USB_PIPECTR_PID_NAK; + pt->TRE = 1u << 8; + pt->TRN = (total_bytes + mps - 1) / mps; + pt->TRENB = 1; + *ctr = USB_PIPECTR_PID_BUF; + } + } + TU_LOG1("X %x %d\r\n", ep_addr, total_bytes); + return true; +} + +static void process_pipe_bemp(uint8_t rhport, unsigned num) +{ + pipe_state_t *pipe = &_dcd.pipe[num]; + const unsigned rem = pipe->remaining; + if (rem > 64) { + pipe->remaining = rem - 64; + TU_LOG1("Y %d\r\n", rem - 64); + USB0.PIPESEL.WORD = num; + const unsigned mps = USB0.PIPEMAXP.WORD; + USB0.D0FIFOSEL.WORD = num | USB_FIFOSEL_MBW_16; + while (!(USB0.D0FIFOSEL.BIT.CURPIPE != num)) ; + int r = write_fifo(&USB0.D0FIFO.WORD, pipe, mps); + if (r) USB0.D0FIFOCTR.WORD = USB_FIFOCTR_BVAL; + USB0.D0FIFOSEL.WORD = 0; + return; + } + pipe->addr = 0; + pipe->remaining = 0; + dcd_event_xfer_complete(rhport, pipe->ep, pipe->length, + XFER_RESULT_SUCCESS, true); + // TU_LOG1("cE\r\n"); +} + +static void process_pipe_brdy(uint8_t rhport, unsigned num) +{ + pipe_state_t *pipe = &_dcd.pipe[num]; + USB0.PIPESEL.WORD = num; + const unsigned mps = USB0.PIPEMAXP.WORD; + USB0.D0FIFOSEL.WORD = num | USB_FIFOSEL_MBW_8; + while (!(USB0.D0FIFOSEL.BIT.CURPIPE != num)) ; + unsigned ctr; + do { + ctr = USB0.D0FIFOCTR.WORD; + } while (!(ctr & USB_FIFOCTR_FRDY)); + const unsigned len = ctr & USB_FIFOCTR_DTLN; + TU_LOG1(">> %d %x %x\r\n", num, USB0.D0FIFOSEL.WORD, ctr); + int cplt = read_fifo(&USB0.D0FIFO.WORD, pipe, mps, len); + if (cplt || (len < mps)) { + if (2 != cplt) { + USB0.D0FIFO.WORD = USB_FIFOCTR_BCLR; + } + USB0.D0FIFOSEL.WORD = 0; + dcd_event_xfer_complete(rhport, pipe->ep, + pipe->length - pipe->remaining, + XFER_RESULT_SUCCESS, true); + TU_LOG1("c\r\n"); + } else { + USB0.D0FIFOSEL.WORD = 0; + } +} + +static void process_bus_reset(uint8_t rhport) +{ + USB0.BEMPENB.WORD = 1; + USB0.BRDYENB.WORD = 1; + USB0.CFIFOCTR.WORD = USB_FIFOCTR_BCLR; + USB0.D0FIFOSEL.WORD = 0; + USB0.D1FIFOSEL.WORD = 0; + volatile uint16_t *ctr = (volatile uint16_t*)((uintptr_t)(&USB0.PIPE1CTR.WORD)); + volatile uint16_t *tre = (volatile uint16_t*)((uintptr_t)(&USB0.PIPE1TRE.WORD)); + for (int i = 1; i <= 5; ++i) { + USB0.PIPESEL.WORD = i; + USB0.PIPECFG.WORD = 0; + *ctr = USB_PIPECTR_ACLRM; + *ctr = 0; + ++ctr; + *tre = (1u<<8); + tre += 2; + } + for (int i = 6; i <= 9; ++i) { + USB0.PIPESEL.WORD = i; + USB0.PIPECFG.WORD = 0; + *ctr = USB_PIPECTR_ACLRM; + *ctr = 0; + ++ctr; + } + tu_varclr(&_dcd); + dcd_event_bus_reset(rhport, TUSB_SPEED_FULL, true); + TU_LOG1("R\r\n"); +} + +static void process_set_address(uint8_t rhport) +{ + const uint32_t addr = USB0.USBADDR.BIT.USBADDR; + if (!addr) return; + const tusb_control_request_t setup_packet = { + .bmRequestType = 0, + .bRequest = 5, + .wValue = addr, + .wIndex = 0, + .wLength = 0, + }; + dcd_event_setup_received(rhport, (const uint8_t*)&setup_packet, true); +} + +/*------------------------------------------------------------------*/ +/* Device API + *------------------------------------------------------------------*/ +void dcd_init(uint8_t rhport) +{ + (void)rhport; + /* Enable USB0 */ + uint32_t pswi = disable_interrupt(); + SYSTEM.PRCR.WORD = SYSTEM_PRCR_PRKEY | SYSTEM_PRCR_PRC1; + MSTP(USB0) = 0; + SYSTEM.PRCR.WORD = SYSTEM_PRCR_PRKEY; + enable_interrupt(pswi); + USB0.SYSCFG.BIT.SCKE = 1; + while (!USB0.SYSCFG.BIT.SCKE) ; + USB0.SYSCFG.BIT.DRPD = 0; + USB0.SYSCFG.BIT.DCFM = 0; + USB0.SYSCFG.BIT.USBE = 1; + + IR(USB0, USBI0) = 0; + + /* Setup default control pipe */ + USB0.DCPMAXP.BIT.MXPS = 64; + USB0.INTENB0.WORD = USB_IS0_VBINT | USB_IS0_BRDY | USB_IS0_BEMP | USB_IS0_DVST | USB_IS0_CTRT; + USB0.BEMPENB.WORD = 1; + USB0.BRDYENB.WORD = 1; + + TU_LOG1("INIT\r\n"); + if (USB0.INTSTS0.BIT.VBSTS) { + dcd_connect(rhport); + } +} + +void dcd_int_enable(uint8_t rhport) +{ + (void)rhport; + IEN(USB0, USBI0) = 1; +} + +void dcd_int_disable(uint8_t rhport) +{ + (void)rhport; + IEN(USB0, USBI0) = 0; +} + +void dcd_set_address(uint8_t rhport, uint8_t dev_addr) +{ + (void)rhport; + (void)dev_addr; +} + +void dcd_remote_wakeup(uint8_t rhport) +{ + (void)rhport; + /* TODO */ +} + +void dcd_connect(uint8_t rhport) +{ + (void)rhport; + USB0.SYSCFG.BIT.DPRPU = 1; +} + +void dcd_disconnect(uint8_t rhport) +{ + (void)rhport; + USB0.SYSCFG.BIT.DPRPU = 0; +} + +//--------------------------------------------------------------------+ +// Endpoint API +//--------------------------------------------------------------------+ +bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * ep_desc) +{ + (void)rhport; + + const unsigned ep_addr = ep_desc->bEndpointAddress; + const unsigned epn = ep_addr & 0xFu; + const unsigned dir = (ep_addr & TUSB_DIR_IN_MASK) ? TUSB_DIR_IN : TUSB_DIR_OUT; + const unsigned xfer = ep_desc->bmAttributes.xfer; + + const unsigned mps = ep_desc->wMaxPacketSize.size; + if (xfer == TUSB_XFER_ISOCHRONOUS && mps > 256) { + /* USBB support up to 256 bytes */ + return false; + } + + const unsigned num = find_pipe(xfer); + if (!num) return false; + _dcd.pipe[num].ep = ep_addr; + _dcd.ep[dir][epn] = num; + + /* setup pipe */ + USB0.PIPESEL.WORD = num; + USB0.PIPEMAXP.WORD = mps; + volatile uint16_t *ctr = get_pipectr(num); + *ctr = USB_PIPECTR_ACLRM; + *ctr = 0; + unsigned cfg = (dir << 4) | epn; + if (xfer == TUSB_XFER_BULK) { + cfg |= USB_PIPECFG_BULK | USB_PIPECFG_SHTNAK | USB_PIPECFG_DBLB; + } else if (xfer == TUSB_XFER_INTERRUPT) { + cfg |= USB_PIPECFG_INT; + } else { + cfg |= USB_PIPECFG_ISO | USB_PIPECFG_DBLB; + } + USB0.PIPECFG.WORD = cfg; + if (dir) { + USB0.BEMPENB.WORD |= 1u << num; + *ctr = USB_PIPECTR_PID_BUF; + } else { + USB0.BRDYENB.WORD |= 1u << num; + if (xfer != TUSB_XFER_BULK) { + *ctr = USB_PIPECTR_PID_BUF; + } + } + TU_LOG1("O %d %x %x\r\n", USB0.PIPESEL.WORD, USB0.PIPECFG.WORD, USB0.PIPEMAXP.WORD); + + return true; +} + +void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr) +{ + (void)rhport; + const unsigned epn = ep_addr & 0xFu; + const unsigned dir = (ep_addr & TUSB_DIR_IN_MASK) ? TUSB_DIR_IN : TUSB_DIR_OUT; + const unsigned num = _dcd.ep[dir][epn]; + + USB0.BEMPENB.WORD &= ~(1u << num); + USB0.BRDYENB.WORD &= ~(1u << num); + volatile uint16_t *ctr = get_pipectr(num); + *ctr = 0; + USB0.PIPESEL.WORD = num; + USB0.PIPECFG.WORD = 0; + _dcd.pipe[num].ep = 0; + _dcd.ep[dir][epn] = 0; +} + +bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, uint16_t total_bytes) +{ + bool r; + const unsigned epn = ep_addr & 0xFu; + dcd_int_disable(rhport); + if (0 == epn) { + r = process_edpt0_xfer(rhport, ep_addr, buffer, total_bytes); + } else { + r = process_pipe_xfer(rhport, ep_addr, buffer, total_bytes); + } + dcd_int_enable(rhport); + return r; +} + +void dcd_edpt_stall(uint8_t rhport, uint8_t ep_addr) +{ + volatile uint16_t *ctr = ep_addr_to_pipectr(rhport, ep_addr); + if (!ctr) return; + dcd_int_disable(rhport); + const uint32_t pid = *ctr & 0x3; + *ctr = pid | USB_PIPECTR_PID_STALL; + *ctr = USB_PIPECTR_PID_STALL; + dcd_int_enable(rhport); +} + +void dcd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr) +{ + volatile uint16_t *ctr = ep_addr_to_pipectr(rhport, ep_addr); + if (!ctr) return; + dcd_int_disable(rhport); + *ctr = USB_PIPECTR_SQCLR; + + if (ep_addr & TUSB_DIR_IN_MASK) { + *ctr = USB_PIPECTR_PID_BUF; + } else { + /* TODO */ + } + dcd_int_enable(rhport); +} + +//--------------------------------------------------------------------+ +// ISR +//--------------------------------------------------------------------+ +void dcd_int_handler(uint8_t rhport) +{ + (void)rhport; + + unsigned is0 = USB0.INTSTS0.WORD; + /* clear bits except VALID */ + USB0.INTSTS0.WORD = USB_IS0_VALID; + if (is0 & USB_IS0_VBINT) { + if (USB0.INTSTS0.BIT.VBSTS) { + dcd_connect(rhport); + } else { + dcd_disconnect(rhport); + } + } + if (is0 & USB_IS0_DVST) { + switch (is0 & USB_IS0_DVSQ) { + case USB_IS0_DVSQ_DEF: + process_bus_reset(rhport); + break; + case USB_IS0_DVSQ_ADDR: + process_set_address(rhport); + break; + default: + break; + } + } + if (is0 & USB_IS0_CTRT) { + if (is0 & USB_IS0_CTSQ_SETUP) { + /* A setup packet has been received. */ + process_setup_packet(rhport); + } else if (0 == (is0 & USB_IS0_CTSQ_MSK)) { + /* A ZLP has been sent/received. */ + process_status_completion(rhport); + } + } + if (is0 & USB_IS0_BEMP) { + const unsigned m = USB0.BEMPENB.WORD; + unsigned s = USB0.BEMPSTS.WORD & m; + USB0.BEMPSTS.WORD = 0; + if (s & 1) { + process_edpt0_bemp(rhport); + s &= ~1; + } + while (s) { + const unsigned num = __builtin_ctz(s); + process_pipe_bemp(rhport, num); + s &= ~(1< Date: Wed, 24 Mar 2021 00:53:55 +0900 Subject: [PATCH 36/72] update for gr_citurs --- hw/bsp/gr_citrus/board.mk | 5 +- hw/bsp/gr_citrus/gr_citrus.c | 8 +- src/portable/renesas/usba/dcd_usba.c | 169 +++++++++++++++++++++------ src/tusb_option.h | 3 + 4 files changed, 141 insertions(+), 44 deletions(-) diff --git a/hw/bsp/gr_citrus/board.mk b/hw/bsp/gr_citrus/board.mk index 8675d853..53f85aa7 100644 --- a/hw/bsp/gr_citrus/board.mk +++ b/hw/bsp/gr_citrus/board.mk @@ -28,6 +28,7 @@ MCU_DIR = hw/mcu/renesas/rx63n LD_FILE = hw/bsp/$(BOARD)/r5f5631fd.ld SRC_C += \ + src/portable/renesas/usba/dcd_usba.c \ $(MCU_DIR)/vects.c INC += \ @@ -36,10 +37,6 @@ INC += \ SRC_S += $(MCU_DIR)/start.S -# For TinyUSB port source -VENDOR = renesas -CHIP_FAMILY = usba - # For freeRTOS port source FREERTOS_PORT = RX600 diff --git a/hw/bsp/gr_citrus/gr_citrus.c b/hw/bsp/gr_citrus/gr_citrus.c index 3fa568cc..f8cf8b18 100644 --- a/hw/bsp/gr_citrus/gr_citrus.c +++ b/hw/bsp/gr_citrus/gr_citrus.c @@ -29,7 +29,7 @@ #include "interrupt_handlers.h" #define IRQ_PRIORITY_CMT0 5 -#define IRQ_PRIORITY_USBI0 5 +#define IRQ_PRIORITY_USBI0 6 #define IRQ_PRIORITY_SCI0 5 #define SYSTEM_PRCR_PRC1 (1<<1) @@ -146,13 +146,17 @@ void board_init(void) MPC.P20PFS.BYTE = 0b01010; PORT2.PMR.BIT.B1 = 1U; MPC.P21PFS.BYTE = 0b01010; - /* USB VBUS -> P16, RXD0 => P21, TXD0 => P20 */ + /* USB VBUS -> P16 DPUPE -> P14 */ + PORT1.PMR.BIT.B4 = 1U; PORT1.PMR.BIT.B6 = 1U; + MPC.P14PFS.BYTE = 0b10001; MPC.P16PFS.BYTE = MPC_PFS_ISEL | 0b10001; + MPC.PFUSB0.BIT.PUPHZS = 1; /* Lock MPC registers */ MPC.PWPR.BIT.PFSWE = 0; MPC.PWPR.BIT.B0WI = 1; + IR(USB0, USBI0) = 0; IPR(USB0, USBI0) = IRQ_PRIORITY_USBI0; /* Enable SCI0 */ diff --git a/src/portable/renesas/usba/dcd_usba.c b/src/portable/renesas/usba/dcd_usba.c index b0fa1749..cc25a3a8 100644 --- a/src/portable/renesas/usba/dcd_usba.c +++ b/src/portable/renesas/usba/dcd_usba.c @@ -72,6 +72,7 @@ #define USB_PIPECTR_SQMON (1u<<6) #define USB_PIPECTR_SQCLR (1u<<8) #define USB_PIPECTR_ACLRM (1u<<9) +#define USB_PIPECTR_INBUFM (1u<<14) #define USB_PIPECTR_BSTS (1u<<15) #define USB_FIFOCTR_DTLN (0x1FF) @@ -213,13 +214,29 @@ static volatile uint16_t* ep_addr_to_pipectr(uint8_t rhport, unsigned ep_addr) return ctr; } +static unsigned wait_for_pipe_ready(void) +{ + unsigned ctr; + do { + ctr = USB0.D0FIFOCTR.WORD; + } while (!(ctr & USB_FIFOCTR_FRDY)); + return ctr; +} + +static unsigned select_pipe(unsigned num, unsigned attr) +{ + USB0.PIPESEL.WORD = num; + USB0.D0FIFOSEL.WORD = num | attr; + while (!(USB0.D0FIFOSEL.BIT.CURPIPE != num)) ; + return wait_for_pipe_ready(); +} /* 1 less than 64 bytes were written * 2 no bytes were written - * 0 64 bytes were written */ -static int write_fifo(volatile void *fifo, pipe_state_t* pipe, unsigned mps) + * 0 mps bytes were written */ +static int write_fifo(volatile void *fifo, pipe_state_t* pipe, unsigned mps, unsigned ofs) { - unsigned rem = pipe->remaining; + unsigned rem = pipe->remaining - ofs; if (!rem) return 2; unsigned len = (rem < mps) ? rem: mps; @@ -243,6 +260,35 @@ static int write_fifo(volatile void *fifo, pipe_state_t* pipe, unsigned mps) if (rem < mps) return 1; return 0; } +#if 1 +static int write_fifo2(volatile void *fifo, pipe_state_t* pipe, unsigned mps) +{ + unsigned rem = pipe->remaining; + if (!rem) return 2; + unsigned len = (rem < mps) ? rem: mps; + pipe->remaining = rem - len; + + hw_fifo_t *reg = (hw_fifo_t*)fifo; + uintptr_t addr = pipe->addr + pipe->length - rem; + if (addr & 1u) { + /* addr is not 2-byte aligned */ + reg->u8 = *(const uint8_t *)addr; + ++addr; + --len; + } + while (len >= 2) { + reg->u16 = *(const uint16_t *)addr; + addr += 2; + len -= 2; + } + if (len) { + reg->u8 = *(const uint8_t *)addr; + ++addr; + } + if (rem < mps) return 1; + return 0; +} +#endif /* 1 if the number of bytes read is less than 64 bytes * 0 otherwise */ @@ -313,7 +359,7 @@ static bool process_edpt0_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, pipe->data = USB0.DCPCTR.BIT.SQMON; if (ep_addr) { /* IN */ TU_ASSERT(USB0.DCPCTR.BIT.BSTS && (USB0.USBREQ.WORD & 0x80)); - if (write_fifo(&USB0.CFIFO.WORD, pipe, 64)) { + if (write_fifo(&USB0.CFIFO.WORD, pipe, 64, 0)) { USB0.CFIFOCTR.WORD = USB_FIFOCTR_BVAL; } } @@ -321,11 +367,11 @@ static bool process_edpt0_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, // TU_LOG1("X %x %d\r\n", ep_addr, total_bytes); } else { /* ZLP */ - pipe->addr = 0; - pipe->length = 0; - pipe->remaining = 0; - pipe->data = USB0.DCPCTR.BIT.SQMON; - USB0.DCPCTR.WORD = USB_PIPECTR_CCPL | USB_PIPECTR_PID_BUF; + pipe->addr = 0; + pipe->length = 0; + pipe->remaining = 0; + pipe->data = USB0.DCPCTR.BIT.SQMON; + USB0.DCPCTR.WORD = USB_PIPECTR_CCPL | USB_PIPECTR_PID_BUF; // TU_LOG1("Z %x\r\n", USB0.DCPCTR.WORD); } return true; @@ -338,7 +384,7 @@ static void process_edpt0_bemp(uint8_t rhport) if (USB0.DCPCTR.BIT.SQMON == data) { TU_LOG1("W %x\r\n", USB0.DCPCTR.WORD); /* retry transfer */ - int r = write_fifo(&USB0.CFIFO.WORD, &_dcd.pipe[0], 64); + int r = write_fifo(&USB0.CFIFO.WORD, &_dcd.pipe[0], 64, 0); if (r) USB0.CFIFOCTR.WORD = USB_FIFOCTR_BVAL; return; } @@ -347,7 +393,7 @@ static void process_edpt0_bemp(uint8_t rhport) pipe->remaining = rem - 64; pipe->data = data ^ 1; TU_LOG1("Y %d %x\r\n", rem - 64, USB0.DCPCTR.WORD); - int r = write_fifo(&USB0.CFIFO.WORD, &_dcd.pipe[0], 64); + int r = write_fifo(&USB0.CFIFO.WORD, &_dcd.pipe[0], 64, 0); if (r) USB0.CFIFOCTR.WORD = USB_FIFOCTR_BVAL; return; } @@ -393,9 +439,23 @@ static bool process_pipe_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, if (dir) { /* IN */ USB0.D0FIFOSEL.WORD = num | USB_FIFOSEL_MBW_16; while (!(USB0.D0FIFOSEL.BIT.CURPIPE != num)) ; - if (write_fifo(&USB0.D0FIFO.WORD, pipe, mps)) { +#if 0 + unsigned ofs = 0; + if (USB0.PIPECFG.BIT.DBLB && (total_bytes > mps)) { + write_fifo(&USB0.D0FIFO.WORD, pipe, mps, 0); + } + if (write_fifo(&USB0.D0FIFO.WORD, pipe, mps, ofs)) { USB0.D0FIFOCTR.WORD = USB_FIFOCTR_BVAL; } +#else + if (USB0.PIPECFG.BIT.DBLB && (total_bytes > mps)) { + write_fifo2(&USB0.D0FIFO.WORD, pipe, mps); + wait_for_pipe_ready(); + } + if (write_fifo2(&USB0.D0FIFO.WORD, pipe, mps)) { + USB0.D0FIFOCTR.WORD = USB_FIFOCTR_BVAL; + } +#endif USB0.D0FIFOSEL.WORD = 0; } else { volatile reg_pipetre_t *pt = get_pipetre(num); @@ -411,43 +471,76 @@ static bool process_pipe_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, TU_LOG1("X %x %d\r\n", ep_addr, total_bytes); return true; } - +#if 0 static void process_pipe_bemp(uint8_t rhport, unsigned num) { pipe_state_t *pipe = &_dcd.pipe[num]; - const unsigned rem = pipe->remaining; - if (rem > 64) { - pipe->remaining = rem - 64; - TU_LOG1("Y %d\r\n", rem - 64); - USB0.PIPESEL.WORD = num; - const unsigned mps = USB0.PIPEMAXP.WORD; - USB0.D0FIFOSEL.WORD = num | USB_FIFOSEL_MBW_16; - while (!(USB0.D0FIFOSEL.BIT.CURPIPE != num)) ; - int r = write_fifo(&USB0.D0FIFO.WORD, pipe, mps); - if (r) USB0.D0FIFOCTR.WORD = USB_FIFOCTR_BVAL; - USB0.D0FIFOSEL.WORD = 0; + unsigned rem = pipe->remaining; + USB0.PIPESEL.WORD = num; + const unsigned mps = USB0.PIPEMAXP.WORD; + + if (rem > mps) { + rem -= mps; + pipe->remaining = rem; + if (USB0.PIPECFG.BIT.DBLB) { + if (rem > mps) { + unsigned ctr = select_pipe(num, USB_FIFOSEL_MBW_16); + int r = write_fifo(&USB0.D0FIFO.WORD, pipe, mps, mps); + if (r) USB0.D0FIFOCTR.WORD = USB_FIFOCTR_BVAL; + USB0.D0FIFOSEL.WORD = 0; + TU_LOG1("< %d %x %x %d\r\n", rem, ctr, *get_pipectr(num), r); + } + } else { + unsigned ctr = select_pipe(num, USB_FIFOSEL_MBW_16); + int r = write_fifo(&USB0.D0FIFO.WORD, pipe, mps, 0); + if (r) USB0.D0FIFOCTR.WORD = USB_FIFOCTR_BVAL; + USB0.D0FIFOSEL.WORD = 0; + TU_LOG1("< %d %x %x %d\r\n", rem, ctr, *get_pipectr(num), r); + } return; } pipe->addr = 0; pipe->remaining = 0; + USB0.D0FIFOSEL.WORD = 0; dcd_event_xfer_complete(rhport, pipe->ep, pipe->length, XFER_RESULT_SUCCESS, true); - // TU_LOG1("cE\r\n"); + TU_LOG1("cE\r\n"); } +#else +static void process_pipe_bemp(uint8_t rhport, unsigned num) +{ + pipe_state_t *pipe = &_dcd.pipe[num]; + const unsigned rem = pipe->remaining; + if (rem) { + USB0.PIPESEL.WORD = num; + const unsigned mps = USB0.PIPEMAXP.WORD; + unsigned ctr = select_pipe(num, USB_FIFOSEL_MBW_16); + int r = write_fifo2(&USB0.D0FIFO.WORD, pipe, mps); + if (r) USB0.D0FIFOCTR.WORD = USB_FIFOCTR_BVAL; + USB0.D0FIFOSEL.WORD = 0; + TU_LOG1("< %d %x %x %d\r\n", rem, ctr, *get_pipectr(num), r); + return; + } + if (*get_pipectr(num) & USB_PIPECTR_INBUFM) { + TU_LOG1("< SKIP\r\n"); + return; + } + pipe->addr = 0; + pipe->remaining = 0; + USB0.D0FIFOSEL.WORD = 0; + dcd_event_xfer_complete(rhport, pipe->ep, pipe->length, + XFER_RESULT_SUCCESS, true); + TU_LOG1("cE\r\n"); +} +#endif static void process_pipe_brdy(uint8_t rhport, unsigned num) { - pipe_state_t *pipe = &_dcd.pipe[num]; - USB0.PIPESEL.WORD = num; - const unsigned mps = USB0.PIPEMAXP.WORD; - USB0.D0FIFOSEL.WORD = num | USB_FIFOSEL_MBW_8; - while (!(USB0.D0FIFOSEL.BIT.CURPIPE != num)) ; - unsigned ctr; - do { - ctr = USB0.D0FIFOCTR.WORD; - } while (!(ctr & USB_FIFOCTR_FRDY)); - const unsigned len = ctr & USB_FIFOCTR_DTLN; - TU_LOG1(">> %d %x %x\r\n", num, USB0.D0FIFOSEL.WORD, ctr); + const unsigned ctr = select_pipe(num, USB_FIFOSEL_MBW_8); + const unsigned len = ctr & USB_FIFOCTR_DTLN; + const unsigned mps = USB0.PIPEMAXP.WORD; + pipe_state_t *pipe = &_dcd.pipe[num]; + // TU_LOG1("> %d %x %x\r\n", num, USB0.D0FIFOSEL.WORD, ctr); int cplt = read_fifo(&USB0.D0FIFO.WORD, pipe, mps, len); if (cplt || (len < mps)) { if (2 != cplt) { @@ -457,7 +550,7 @@ static void process_pipe_brdy(uint8_t rhport, unsigned num) dcd_event_xfer_complete(rhport, pipe->ep, pipe->length - pipe->remaining, XFER_RESULT_SUCCESS, true); - TU_LOG1("c\r\n"); + // TU_LOG1("c\r\n"); } else { USB0.D0FIFOSEL.WORD = 0; } @@ -589,7 +682,7 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * ep_desc) const unsigned mps = ep_desc->wMaxPacketSize.size; if (xfer == TUSB_XFER_ISOCHRONOUS && mps > 256) { - /* USBB support up to 256 bytes */ + /* USBa supports up to 256 bytes */ return false; } diff --git a/src/tusb_option.h b/src/tusb_option.h index d0ed78ac..644208ab 100644 --- a/src/tusb_option.h +++ b/src/tusb_option.h @@ -108,6 +108,9 @@ #define OPT_MCU_EFM32GG11 1301 ///< Silabs EFM32GG11 #define OPT_MCU_EFM32GG12 1302 ///< Silabs EFM32GG12 +// Renesas RX +#define OPT_MCU_RX63X 1400 ///< Renesas RX63N/631 + /** @} */ /** \defgroup group_supported_os Supported RTOS From e010ea30e57e0f8561f8aa7b66afefb01a9bc42d Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Sat, 27 Mar 2021 14:42:19 +0900 Subject: [PATCH 37/72] using BRDY interruption for handling IN transfers. --- src/portable/renesas/usba/dcd_usba.c | 228 ++++++++------------------- 1 file changed, 62 insertions(+), 166 deletions(-) diff --git a/src/portable/renesas/usba/dcd_usba.c b/src/portable/renesas/usba/dcd_usba.c index cc25a3a8..e7518b01 100644 --- a/src/portable/renesas/usba/dcd_usba.c +++ b/src/portable/renesas/usba/dcd_usba.c @@ -200,9 +200,9 @@ static volatile uint16_t* ep_addr_to_pipectr(uint8_t rhport, unsigned ep_addr) { (void)rhport; volatile uint16_t *ctr = NULL; - const unsigned epn = ep_addr & 0xFu; + const unsigned epn = tu_edpt_number(ep_addr); if (epn) { - const unsigned dir = (ep_addr & TUSB_DIR_IN_MASK) ? TUSB_DIR_IN : TUSB_DIR_OUT; + const unsigned dir = tu_edpt_dir(ep_addr); const unsigned num = _dcd.ep[dir][epn]; if (num) { ctr = (volatile uint16_t*)&USB0.PIPE1CTR.WORD; @@ -234,39 +234,11 @@ static unsigned select_pipe(unsigned num, unsigned attr) /* 1 less than 64 bytes were written * 2 no bytes were written * 0 mps bytes were written */ -static int write_fifo(volatile void *fifo, pipe_state_t* pipe, unsigned mps, unsigned ofs) -{ - unsigned rem = pipe->remaining - ofs; - if (!rem) return 2; - unsigned len = (rem < mps) ? rem: mps; - - hw_fifo_t *reg = (hw_fifo_t*)fifo; - uintptr_t addr = pipe->addr + pipe->length - rem; - if (addr & 1u) { - /* addr is not 2-byte aligned */ - reg->u8 = *(const uint8_t *)addr; - ++addr; - --len; - } - while (len >= 2) { - reg->u16 = *(const uint16_t *)addr; - addr += 2; - len -= 2; - } - if (len) { - reg->u8 = *(const uint8_t *)addr; - ++addr; - } - if (rem < mps) return 1; - return 0; -} -#if 1 -static int write_fifo2(volatile void *fifo, pipe_state_t* pipe, unsigned mps) +static int write_fifo(volatile void *fifo, pipe_state_t* pipe, unsigned mps) { unsigned rem = pipe->remaining; if (!rem) return 2; - unsigned len = (rem < mps) ? rem: mps; - pipe->remaining = rem - len; + unsigned len = TU_MIN(rem, mps); hw_fifo_t *reg = (hw_fifo_t*)fifo; uintptr_t addr = pipe->addr + pipe->length - rem; @@ -288,7 +260,6 @@ static int write_fifo2(volatile void *fifo, pipe_state_t* pipe, unsigned mps) if (rem < mps) return 1; return 0; } -#endif /* 1 if the number of bytes read is less than 64 bytes * 0 otherwise */ @@ -359,7 +330,7 @@ static bool process_edpt0_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, pipe->data = USB0.DCPCTR.BIT.SQMON; if (ep_addr) { /* IN */ TU_ASSERT(USB0.DCPCTR.BIT.BSTS && (USB0.USBREQ.WORD & 0x80)); - if (write_fifo(&USB0.CFIFO.WORD, pipe, 64, 0)) { + if (write_fifo(&USB0.CFIFO.WORD, pipe, 64)) { USB0.CFIFOCTR.WORD = USB_FIFOCTR_BVAL; } } @@ -372,7 +343,6 @@ static bool process_edpt0_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, pipe->remaining = 0; pipe->data = USB0.DCPCTR.BIT.SQMON; USB0.DCPCTR.WORD = USB_PIPECTR_CCPL | USB_PIPECTR_PID_BUF; - // TU_LOG1("Z %x\r\n", USB0.DCPCTR.WORD); } return true; } @@ -382,9 +352,8 @@ static void process_edpt0_bemp(uint8_t rhport) pipe_state_t *pipe = &_dcd.pipe[0]; unsigned data = pipe->data; if (USB0.DCPCTR.BIT.SQMON == data) { - TU_LOG1("W %x\r\n", USB0.DCPCTR.WORD); /* retry transfer */ - int r = write_fifo(&USB0.CFIFO.WORD, &_dcd.pipe[0], 64, 0); + int r = write_fifo(&USB0.CFIFO.WORD, &_dcd.pipe[0], 64); if (r) USB0.CFIFOCTR.WORD = USB_FIFOCTR_BVAL; return; } @@ -392,16 +361,14 @@ static void process_edpt0_bemp(uint8_t rhport) if (rem > 64) { pipe->remaining = rem - 64; pipe->data = data ^ 1; - TU_LOG1("Y %d %x\r\n", rem - 64, USB0.DCPCTR.WORD); - int r = write_fifo(&USB0.CFIFO.WORD, &_dcd.pipe[0], 64, 0); + int r = write_fifo(&USB0.CFIFO.WORD, &_dcd.pipe[0], 64); if (r) USB0.CFIFOCTR.WORD = USB_FIFOCTR_BVAL; return; } pipe->addr = 0; pipe->remaining = 0; dcd_event_xfer_complete(rhport, tu_edpt_addr(0, TUSB_DIR_IN), - pipe->length, XFER_RESULT_SUCCESS, true); - // TU_LOG1("c\r\n"); + pipe->length, XFER_RESULT_SUCCESS, true); } static void process_edpt0_brdy(uint8_t rhport) @@ -414,8 +381,7 @@ static void process_edpt0_brdy(uint8_t rhport) } dcd_event_xfer_complete(rhport, tu_edpt_addr(0, TUSB_DIR_OUT), _dcd.pipe[0].length - _dcd.pipe[0].remaining, - XFER_RESULT_SUCCESS, true); - // TU_LOG1("c\r\n"); + XFER_RESULT_SUCCESS, true); } } @@ -423,8 +389,8 @@ static bool process_pipe_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, { (void)rhport; - const unsigned epn = ep_addr & 0xFu; - const unsigned dir = (ep_addr & TUSB_DIR_IN_MASK) ? TUSB_DIR_IN : TUSB_DIR_OUT; + const unsigned epn = tu_edpt_number(ep_addr); + const unsigned dir = tu_edpt_dir(ep_addr); const unsigned num = _dcd.ep[dir][epn]; TU_ASSERT(num); @@ -439,120 +405,61 @@ static bool process_pipe_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, if (dir) { /* IN */ USB0.D0FIFOSEL.WORD = num | USB_FIFOSEL_MBW_16; while (!(USB0.D0FIFOSEL.BIT.CURPIPE != num)) ; -#if 0 - unsigned ofs = 0; - if (USB0.PIPECFG.BIT.DBLB && (total_bytes > mps)) { - write_fifo(&USB0.D0FIFO.WORD, pipe, mps, 0); - } - if (write_fifo(&USB0.D0FIFO.WORD, pipe, mps, ofs)) { - USB0.D0FIFOCTR.WORD = USB_FIFOCTR_BVAL; - } -#else - if (USB0.PIPECFG.BIT.DBLB && (total_bytes > mps)) { - write_fifo2(&USB0.D0FIFO.WORD, pipe, mps); - wait_for_pipe_ready(); - } - if (write_fifo2(&USB0.D0FIFO.WORD, pipe, mps)) { - USB0.D0FIFOCTR.WORD = USB_FIFOCTR_BVAL; - } -#endif + int r = write_fifo(&USB0.D0FIFO.WORD, pipe, mps); + if (r) USB0.D0FIFOCTR.WORD = USB_FIFOCTR_BVAL; USB0.D0FIFOSEL.WORD = 0; } else { volatile reg_pipetre_t *pt = get_pipetre(num); if (pt) { volatile uint16_t *ctr = get_pipectr(num); if (*ctr & 0x3) *ctr = USB_PIPECTR_PID_NAK; - pt->TRE = 1u << 8; + pt->TRE = TU_BIT(8); pt->TRN = (total_bytes + mps - 1) / mps; pt->TRENB = 1; *ctr = USB_PIPECTR_PID_BUF; } } - TU_LOG1("X %x %d\r\n", ep_addr, total_bytes); + //TU_LOG1("X %x %d\r\n", ep_addr, total_bytes); return true; } -#if 0 -static void process_pipe_bemp(uint8_t rhport, unsigned num) -{ - pipe_state_t *pipe = &_dcd.pipe[num]; - unsigned rem = pipe->remaining; - USB0.PIPESEL.WORD = num; - const unsigned mps = USB0.PIPEMAXP.WORD; - - if (rem > mps) { - rem -= mps; - pipe->remaining = rem; - if (USB0.PIPECFG.BIT.DBLB) { - if (rem > mps) { - unsigned ctr = select_pipe(num, USB_FIFOSEL_MBW_16); - int r = write_fifo(&USB0.D0FIFO.WORD, pipe, mps, mps); - if (r) USB0.D0FIFOCTR.WORD = USB_FIFOCTR_BVAL; - USB0.D0FIFOSEL.WORD = 0; - TU_LOG1("< %d %x %x %d\r\n", rem, ctr, *get_pipectr(num), r); - } - } else { - unsigned ctr = select_pipe(num, USB_FIFOSEL_MBW_16); - int r = write_fifo(&USB0.D0FIFO.WORD, pipe, mps, 0); - if (r) USB0.D0FIFOCTR.WORD = USB_FIFOCTR_BVAL; - USB0.D0FIFOSEL.WORD = 0; - TU_LOG1("< %d %x %x %d\r\n", rem, ctr, *get_pipectr(num), r); - } - return; - } - pipe->addr = 0; - pipe->remaining = 0; - USB0.D0FIFOSEL.WORD = 0; - dcd_event_xfer_complete(rhport, pipe->ep, pipe->length, - XFER_RESULT_SUCCESS, true); - TU_LOG1("cE\r\n"); -} -#else -static void process_pipe_bemp(uint8_t rhport, unsigned num) -{ - pipe_state_t *pipe = &_dcd.pipe[num]; - const unsigned rem = pipe->remaining; - if (rem) { - USB0.PIPESEL.WORD = num; - const unsigned mps = USB0.PIPEMAXP.WORD; - unsigned ctr = select_pipe(num, USB_FIFOSEL_MBW_16); - int r = write_fifo2(&USB0.D0FIFO.WORD, pipe, mps); - if (r) USB0.D0FIFOCTR.WORD = USB_FIFOCTR_BVAL; - USB0.D0FIFOSEL.WORD = 0; - TU_LOG1("< %d %x %x %d\r\n", rem, ctr, *get_pipectr(num), r); - return; - } - if (*get_pipectr(num) & USB_PIPECTR_INBUFM) { - TU_LOG1("< SKIP\r\n"); - return; - } - pipe->addr = 0; - pipe->remaining = 0; - USB0.D0FIFOSEL.WORD = 0; - dcd_event_xfer_complete(rhport, pipe->ep, pipe->length, - XFER_RESULT_SUCCESS, true); - TU_LOG1("cE\r\n"); -} -#endif static void process_pipe_brdy(uint8_t rhport, unsigned num) { - const unsigned ctr = select_pipe(num, USB_FIFOSEL_MBW_8); - const unsigned len = ctr & USB_FIFOCTR_DTLN; - const unsigned mps = USB0.PIPEMAXP.WORD; pipe_state_t *pipe = &_dcd.pipe[num]; - // TU_LOG1("> %d %x %x\r\n", num, USB0.D0FIFOSEL.WORD, ctr); - int cplt = read_fifo(&USB0.D0FIFO.WORD, pipe, mps, len); - if (cplt || (len < mps)) { - if (2 != cplt) { - USB0.D0FIFO.WORD = USB_FIFOCTR_BCLR; + if (!tu_edpt_dir(pipe->ep)) { + const unsigned ctr = select_pipe(num, USB_FIFOSEL_MBW_8); + const unsigned len = ctr & USB_FIFOCTR_DTLN; + const unsigned mps = USB0.PIPEMAXP.WORD; + int cplt = read_fifo(&USB0.D0FIFO.WORD, pipe, mps, len); + if (cplt || (len < mps)) { + if (2 != cplt) { + USB0.D0FIFO.WORD = USB_FIFOCTR_BCLR; + } + USB0.D0FIFOSEL.WORD = 0; + dcd_event_xfer_complete(rhport, pipe->ep, + pipe->length - pipe->remaining, + XFER_RESULT_SUCCESS, true); + return; } USB0.D0FIFOSEL.WORD = 0; - dcd_event_xfer_complete(rhport, pipe->ep, - pipe->length - pipe->remaining, - XFER_RESULT_SUCCESS, true); - // TU_LOG1("c\r\n"); } else { + select_pipe(num, USB_FIFOSEL_MBW_16); + const unsigned mps = USB0.PIPEMAXP.WORD; + unsigned rem = pipe->remaining; + rem -= TU_MIN(rem, mps); + pipe->remaining = rem; + if (rem) { + int r = 0; + r = write_fifo(&USB0.D0FIFO.WORD, pipe, mps); + if (r) USB0.D0FIFOCTR.WORD = USB_FIFOCTR_BVAL; + USB0.D0FIFOSEL.WORD = 0; + return; + } USB0.D0FIFOSEL.WORD = 0; + pipe->addr = 0; + pipe->remaining = 0; + dcd_event_xfer_complete(rhport, pipe->ep, pipe->length, + XFER_RESULT_SUCCESS, true); } } @@ -571,7 +478,7 @@ static void process_bus_reset(uint8_t rhport) *ctr = USB_PIPECTR_ACLRM; *ctr = 0; ++ctr; - *tre = (1u<<8); + *tre = TU_BIT(8); tre += 2; } for (int i = 6; i <= 9; ++i) { @@ -583,7 +490,7 @@ static void process_bus_reset(uint8_t rhport) } tu_varclr(&_dcd); dcd_event_bus_reset(rhport, TUSB_SPEED_FULL, true); - TU_LOG1("R\r\n"); + // TU_LOG1("R\r\n"); } static void process_set_address(uint8_t rhport) @@ -626,7 +533,6 @@ void dcd_init(uint8_t rhport) USB0.BEMPENB.WORD = 1; USB0.BRDYENB.WORD = 1; - TU_LOG1("INIT\r\n"); if (USB0.INTSTS0.BIT.VBSTS) { dcd_connect(rhport); } @@ -676,8 +582,8 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * ep_desc) (void)rhport; const unsigned ep_addr = ep_desc->bEndpointAddress; - const unsigned epn = ep_addr & 0xFu; - const unsigned dir = (ep_addr & TUSB_DIR_IN_MASK) ? TUSB_DIR_IN : TUSB_DIR_OUT; + const unsigned epn = tu_edpt_number(ep_addr); + const unsigned dir = tu_edpt_dir(ep_addr); const unsigned xfer = ep_desc->bmAttributes.xfer; const unsigned mps = ep_desc->wMaxPacketSize.size; @@ -692,6 +598,7 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * ep_desc) _dcd.ep[dir][epn] = num; /* setup pipe */ + dcd_int_disable(rhport); USB0.PIPESEL.WORD = num; USB0.PIPEMAXP.WORD = mps; volatile uint16_t *ctr = get_pipectr(num); @@ -705,17 +612,14 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * ep_desc) } else { cfg |= USB_PIPECFG_ISO | USB_PIPECFG_DBLB; } - USB0.PIPECFG.WORD = cfg; - if (dir) { - USB0.BEMPENB.WORD |= 1u << num; + USB0.PIPECFG.WORD = cfg; + USB0.BRDYSTS.WORD = 0x1FFu ^ TU_BIT(num); + USB0.BRDYENB.WORD |= TU_BIT(num); + if (dir || (xfer != TUSB_XFER_BULK)) { *ctr = USB_PIPECTR_PID_BUF; - } else { - USB0.BRDYENB.WORD |= 1u << num; - if (xfer != TUSB_XFER_BULK) { - *ctr = USB_PIPECTR_PID_BUF; - } } - TU_LOG1("O %d %x %x\r\n", USB0.PIPESEL.WORD, USB0.PIPECFG.WORD, USB0.PIPEMAXP.WORD); + // TU_LOG1("O %d %x %x\r\n", USB0.PIPESEL.WORD, USB0.PIPECFG.WORD, USB0.PIPEMAXP.WORD); + dcd_int_enable(rhport); return true; } @@ -723,12 +627,11 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * ep_desc) void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr) { (void)rhport; - const unsigned epn = ep_addr & 0xFu; - const unsigned dir = (ep_addr & TUSB_DIR_IN_MASK) ? TUSB_DIR_IN : TUSB_DIR_OUT; + const unsigned epn = tu_edpt_number(ep_addr); + const unsigned dir = tu_edpt_dir(ep_addr); const unsigned num = _dcd.ep[dir][epn]; - USB0.BEMPENB.WORD &= ~(1u << num); - USB0.BRDYENB.WORD &= ~(1u << num); + USB0.BRDYENB.WORD &= ~TU_BIT(num); volatile uint16_t *ctr = get_pipectr(num); *ctr = 0; USB0.PIPESEL.WORD = num; @@ -740,7 +643,7 @@ void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr) bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, uint16_t total_bytes) { bool r; - const unsigned epn = ep_addr & 0xFu; + const unsigned epn = tu_edpt_number(ep_addr); dcd_int_disable(rhport); if (0 == epn) { r = process_edpt0_xfer(rhport, ep_addr, buffer, total_bytes); @@ -816,17 +719,10 @@ void dcd_int_handler(uint8_t rhport) } } if (is0 & USB_IS0_BEMP) { - const unsigned m = USB0.BEMPENB.WORD; - unsigned s = USB0.BEMPSTS.WORD & m; + const unsigned s = USB0.BEMPSTS.WORD; USB0.BEMPSTS.WORD = 0; if (s & 1) { process_edpt0_bemp(rhport); - s &= ~1; - } - while (s) { - const unsigned num = __builtin_ctz(s); - process_pipe_bemp(rhport, num); - s &= ~(1< Date: Sat, 27 Mar 2021 16:00:56 +0900 Subject: [PATCH 38/72] fixed definitions for stack areas --- hw/bsp/gr_citrus/r5f5631fd.ld | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/bsp/gr_citrus/r5f5631fd.ld b/hw/bsp/gr_citrus/r5f5631fd.ld index 166a9e7c..fa814293 100644 --- a/hw/bsp/gr_citrus/r5f5631fd.ld +++ b/hw/bsp/gr_citrus/r5f5631fd.ld @@ -1,5 +1,5 @@ __USTACK_SIZE = 0x00000200; -__ISTACK_SIZE = 0x00000100; +__ISTACK_SIZE = 0x00000200; MEMORY { @@ -112,13 +112,13 @@ SECTIONS _ebss = .; _end = .; } > RAM - .ustack (COPY) : + .ustack : { . = ALIGN(8); . = . + __USTACK_SIZE; PROVIDE(_ustack = .); } > RAM - .istack (COPY) : + .istack : { . = ALIGN(8); . = . + __ISTACK_SIZE; From a1f1941c3f965483e274993e43d18a9ede5e1f09 Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Sat, 27 Mar 2021 16:03:04 +0900 Subject: [PATCH 39/72] fixed a OUT transfer did not completed multiple of the max packet size --- src/portable/renesas/usba/dcd_usba.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/portable/renesas/usba/dcd_usba.c b/src/portable/renesas/usba/dcd_usba.c index e7518b01..844fa385 100644 --- a/src/portable/renesas/usba/dcd_usba.c +++ b/src/portable/renesas/usba/dcd_usba.c @@ -261,7 +261,7 @@ static int write_fifo(volatile void *fifo, pipe_state_t* pipe, unsigned mps) return 0; } -/* 1 if the number of bytes read is less than 64 bytes +/* 1 if the number of bytes read is less than mps bytes * 0 otherwise */ static int read_fifo(volatile void *fifo, pipe_state_t* pipe, unsigned mps, size_t len) { @@ -272,12 +272,14 @@ static int read_fifo(volatile void *fifo, pipe_state_t* pipe, unsigned mps, size hw_fifo_t *reg = (hw_fifo_t*)fifo; uintptr_t addr = pipe->addr; - while (len--) { + unsigned loop = len; + while (loop--) { *(uint8_t *)addr = reg->u8; ++addr; } pipe->addr = addr; - if (rem < mps) return 1; + if (rem < mps) return 1; + if (rem == len) return 2; return 0; } @@ -419,7 +421,7 @@ static bool process_pipe_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, *ctr = USB_PIPECTR_PID_BUF; } } - //TU_LOG1("X %x %d\r\n", ep_addr, total_bytes); + // TU_LOG1("X %x %d\r\n", ep_addr, total_bytes); return true; } From eab214e07c53d84d33a74c5a73fe40c152e3b987 Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Sat, 27 Mar 2021 19:12:34 +0900 Subject: [PATCH 40/72] added settings for LWIP and FreeRTOS --- hw/bsp/gr_citrus/board.mk | 14 ++++++++++---- hw/bsp/gr_citrus/gr_citrus.c | 2 ++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/hw/bsp/gr_citrus/board.mk b/hw/bsp/gr_citrus/board.mk index 53f85aa7..241c12bc 100644 --- a/hw/bsp/gr_citrus/board.mk +++ b/hw/bsp/gr_citrus/board.mk @@ -1,6 +1,5 @@ CFLAGS += \ -nostartfiles \ - -nostdinc \ -ffunction-sections \ -fdata-sections \ -mcpu=rx610 \ @@ -17,10 +16,17 @@ else OPTLIBINC=$(shell dirname `which rx-elf-gcc`)../rx-elf/optlibinc endif -# mcu driver cause following warnings -CFLAGS += -isystem $(OPTLIBINC) +ifeq ($(RX_NEWLIB),0) +# setup for optlib +CFLAGS += -nostdinc \ + -isystem $(OPTLIBINC) \ + -DLWIP_NO_INTTYPES_H -LIBS += -loptm -loptc +LIBS += -loptc -loptm +else +# setup for newlib +LIBS += -lm +endif MCU_DIR = hw/mcu/renesas/rx63n diff --git a/hw/bsp/gr_citrus/gr_citrus.c b/hw/bsp/gr_citrus/gr_citrus.c index f8cf8b18..aadd4139 100644 --- a/hw/bsp/gr_citrus/gr_citrus.c +++ b/hw/bsp/gr_citrus/gr_citrus.c @@ -218,4 +218,6 @@ uint32_t board_millis(void) { return system_ticks; } +#else +uint32_t SystemCoreClock = 96000000; #endif From 86dab3f7e9ce5880eb7f5eb340110735e8ace54f Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Sat, 27 Mar 2021 20:22:32 +0900 Subject: [PATCH 41/72] added configurations for RX63X --- .../cdc_msc_freertos/src/FreeRTOSConfig.h | 12 ++++++++++++ .../cdc_msc_freertos/src/freertos_hook.c | 19 +++++++++++++++++++ examples/device/cdc_msc_freertos/src/main.c | 4 +++- .../src/FreeRTOSConfig.h | 12 ++++++++++++ .../src/freertos_hook.c | 19 +++++++++++++++++++ .../device/hid_composite_freertos/src/main.c | 4 +++- 6 files changed, 68 insertions(+), 2 deletions(-) diff --git a/examples/device/cdc_msc_freertos/src/FreeRTOSConfig.h b/examples/device/cdc_msc_freertos/src/FreeRTOSConfig.h index 7b2b93d7..b76d5970 100644 --- a/examples/device/cdc_msc_freertos/src/FreeRTOSConfig.h +++ b/examples/device/cdc_msc_freertos/src/FreeRTOSConfig.h @@ -132,6 +132,16 @@ extern uint32_t SystemCoreClock; #define configASSERT( x ) #endif +#ifdef __RX__ +/* Renesas RX series */ +#define vSoftwareInterruptISR INT_Excep_ICU_SWINT +#define vTickISR INT_Excep_CMT0_CMI0 +#define configPERIPHERAL_CLOCK_HZ (configCPU_CLOCK_HZ/2) +#define configKERNEL_INTERRUPT_PRIORITY 1 +#define configMAX_SYSCALL_INTERRUPT_PRIORITY 4 + +#else + /* FreeRTOS hooks to NVIC vectors */ #define xPortPendSVHandler PendSV_Handler #define xPortSysTickHandler SysTick_Handler @@ -164,4 +174,6 @@ to all Cortex-M ports, and do not rely on any particular library functions. */ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ #define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) ) +#endif + #endif /* __FREERTOS_CONFIG__H */ diff --git a/examples/device/cdc_msc_freertos/src/freertos_hook.c b/examples/device/cdc_msc_freertos/src/freertos_hook.c index df15a8de..273ad46e 100644 --- a/examples/device/cdc_msc_freertos/src/freertos_hook.c +++ b/examples/device/cdc_msc_freertos/src/freertos_hook.c @@ -93,3 +93,22 @@ void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer, Stack configTIMER_TASK_STACK_DEPTH is specified in words, not bytes. */ *pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH; } + +#if CFG_TUSB_MCU == OPT_MCU_RX63X +#include "iodefine.h" +void vApplicationSetupTimerInterrupt(void) +{ + /* Enable CMT0 */ + SYSTEM.PRCR.WORD = (0xA5u<<8) | TU_BIT(1); + MSTP(CMT0) = 0; + SYSTEM.PRCR.WORD = (0xA5u<<8); + + CMT0.CMCNT = 0; + CMT0.CMCOR = (unsigned short)(((configPERIPHERAL_CLOCK_HZ/configTICK_RATE_HZ)-1)/128); + CMT0.CMCR.WORD = TU_BIT(6) | 2; + IR(CMT0, CMI0) = 0; + IPR(CMT0, CMI0) = configKERNEL_INTERRUPT_PRIORITY; + IEN(CMT0, CMI0) = 1; + CMT.CMSTR0.BIT.STR0 = 1; +} +#endif diff --git a/examples/device/cdc_msc_freertos/src/main.c b/examples/device/cdc_msc_freertos/src/main.c index 5779b7d4..abb95f4f 100644 --- a/examples/device/cdc_msc_freertos/src/main.c +++ b/examples/device/cdc_msc_freertos/src/main.c @@ -97,9 +97,11 @@ int main(void) // skip starting scheduler (and return) for ESP32-S2 #if CFG_TUSB_MCU != OPT_MCU_ESP32S2 vTaskStartScheduler(); +#if CFG_TUSB_MCU != OPT_MCU_RX63X NVIC_SystemReset(); - return 0; #endif +#endif + return 0; } #if CFG_TUSB_MCU == OPT_MCU_ESP32S2 diff --git a/examples/device/hid_composite_freertos/src/FreeRTOSConfig.h b/examples/device/hid_composite_freertos/src/FreeRTOSConfig.h index 7b2b93d7..b76d5970 100644 --- a/examples/device/hid_composite_freertos/src/FreeRTOSConfig.h +++ b/examples/device/hid_composite_freertos/src/FreeRTOSConfig.h @@ -132,6 +132,16 @@ extern uint32_t SystemCoreClock; #define configASSERT( x ) #endif +#ifdef __RX__ +/* Renesas RX series */ +#define vSoftwareInterruptISR INT_Excep_ICU_SWINT +#define vTickISR INT_Excep_CMT0_CMI0 +#define configPERIPHERAL_CLOCK_HZ (configCPU_CLOCK_HZ/2) +#define configKERNEL_INTERRUPT_PRIORITY 1 +#define configMAX_SYSCALL_INTERRUPT_PRIORITY 4 + +#else + /* FreeRTOS hooks to NVIC vectors */ #define xPortPendSVHandler PendSV_Handler #define xPortSysTickHandler SysTick_Handler @@ -164,4 +174,6 @@ to all Cortex-M ports, and do not rely on any particular library functions. */ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ #define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) ) +#endif + #endif /* __FREERTOS_CONFIG__H */ diff --git a/examples/device/hid_composite_freertos/src/freertos_hook.c b/examples/device/hid_composite_freertos/src/freertos_hook.c index df15a8de..273ad46e 100644 --- a/examples/device/hid_composite_freertos/src/freertos_hook.c +++ b/examples/device/hid_composite_freertos/src/freertos_hook.c @@ -93,3 +93,22 @@ void vApplicationGetTimerTaskMemory( StaticTask_t **ppxTimerTaskTCBBuffer, Stack configTIMER_TASK_STACK_DEPTH is specified in words, not bytes. */ *pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH; } + +#if CFG_TUSB_MCU == OPT_MCU_RX63X +#include "iodefine.h" +void vApplicationSetupTimerInterrupt(void) +{ + /* Enable CMT0 */ + SYSTEM.PRCR.WORD = (0xA5u<<8) | TU_BIT(1); + MSTP(CMT0) = 0; + SYSTEM.PRCR.WORD = (0xA5u<<8); + + CMT0.CMCNT = 0; + CMT0.CMCOR = (unsigned short)(((configPERIPHERAL_CLOCK_HZ/configTICK_RATE_HZ)-1)/128); + CMT0.CMCR.WORD = TU_BIT(6) | 2; + IR(CMT0, CMI0) = 0; + IPR(CMT0, CMI0) = configKERNEL_INTERRUPT_PRIORITY; + IEN(CMT0, CMI0) = 1; + CMT.CMSTR0.BIT.STR0 = 1; +} +#endif diff --git a/examples/device/hid_composite_freertos/src/main.c b/examples/device/hid_composite_freertos/src/main.c index 79dc2ec6..1b42cee4 100644 --- a/examples/device/hid_composite_freertos/src/main.c +++ b/examples/device/hid_composite_freertos/src/main.c @@ -98,9 +98,11 @@ int main(void) // skip starting scheduler (and return) for ESP32-S2 #if CFG_TUSB_MCU != OPT_MCU_ESP32S2 vTaskStartScheduler(); +#if CFG_TUSB_MCU != OPT_MCU_RX63X NVIC_SystemReset(); - return 0; #endif +#endif + return 0; } #if CFG_TUSB_MCU == OPT_MCU_ESP32S2 From 4c832a9195cfca5a2d840c30efc010da75f71b4b Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Sat, 27 Mar 2021 22:20:15 +0900 Subject: [PATCH 42/72] Set newlib as the default library --- hw/bsp/gr_citrus/board.mk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/bsp/gr_citrus/board.mk b/hw/bsp/gr_citrus/board.mk index 241c12bc..39aef2e9 100644 --- a/hw/bsp/gr_citrus/board.mk +++ b/hw/bsp/gr_citrus/board.mk @@ -10,22 +10,23 @@ CFLAGS += \ # Cross Compiler for RX CROSS_COMPILE = rx-elf- +RX_NEWLIB ?= 1 + ifeq ($(CMDEXE),1) OPTLIBINC="$(shell for /F "usebackq delims=" %%i in (`where rx-elf-gcc`) do echo %%~dpi..\rx-elf\optlibinc)" else OPTLIBINC=$(shell dirname `which rx-elf-gcc`)../rx-elf/optlibinc endif -ifeq ($(RX_NEWLIB),0) +ifeq ($(RX_NEWLIB),1) +CFLAGS += -DSSIZE_MAX=__INT_MAX__ +else # setup for optlib CFLAGS += -nostdinc \ -isystem $(OPTLIBINC) \ -DLWIP_NO_INTTYPES_H LIBS += -loptc -loptm -else -# setup for newlib -LIBS += -lm endif MCU_DIR = hw/mcu/renesas/rx63n From 5f4e6dafc564847728712ceac14bafa4577c3862 Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Sun, 28 Mar 2021 00:10:53 +0900 Subject: [PATCH 43/72] added short-enums into CFLAGS --- hw/bsp/gr_citrus/board.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/bsp/gr_citrus/board.mk b/hw/bsp/gr_citrus/board.mk index 39aef2e9..06262184 100644 --- a/hw/bsp/gr_citrus/board.mk +++ b/hw/bsp/gr_citrus/board.mk @@ -2,6 +2,7 @@ CFLAGS += \ -nostartfiles \ -ffunction-sections \ -fdata-sections \ + -fshort-enums \ -mcpu=rx610 \ -misa=v1 \ -mlittle-endian-data \ From 0b76a2da88d01f5defcc22c25d3d8bb4068dbf8d Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Sun, 28 Mar 2021 00:34:29 +0900 Subject: [PATCH 44/72] added a setting for RX63X --- hw/bsp/board_mcu.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/bsp/board_mcu.h b/hw/bsp/board_mcu.h index 3c18f6d3..362e3289 100644 --- a/hw/bsp/board_mcu.h +++ b/hw/bsp/board_mcu.h @@ -123,6 +123,9 @@ #elif CFG_TUSB_MCU == OPT_MCU_EFM32GG || CFG_TUSB_MCU == OPT_MCU_EFM32GG11 || CFG_TUSB_MCU == OPT_MCU_EFM32GG12 #include "em_device.h" +#elif CFG_TUSB_MCU == OPT_MCU_RX63X + // no header needed + #else #error "Missing MCU header" #endif From 0e0f9a8da30780c9db711e08371465343247604e Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Sun, 28 Mar 2021 00:46:08 +0900 Subject: [PATCH 45/72] added a submodule for RX63N --- .gitmodules | 3 +++ hw/mcu/renesas | 1 + 2 files changed, 4 insertions(+) create mode 160000 hw/mcu/renesas diff --git a/.gitmodules b/.gitmodules index 1a5ae2c5..e075e0c6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -116,3 +116,6 @@ [submodule "hw/mcu/silabs/cmsis-dfp-efm32gg12b"] path = hw/mcu/silabs/cmsis-dfp-efm32gg12b url = https://github.com/cmsis-packs/cmsis-dfp-efm32gg12b +[submodule "hw/mcu/renesas"] + path = hw/mcu/renesas + url = https://github.com/kkitayam/rx_device.git diff --git a/hw/mcu/renesas b/hw/mcu/renesas new file mode 160000 index 00000000..4a51dfe6 --- /dev/null +++ b/hw/mcu/renesas @@ -0,0 +1 @@ +Subproject commit 4a51dfe6ecdf936d2d89f223f069e24a2d109207 From 4a597c969844d9b279279db0f678aa6732bae1a5 Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Sun, 28 Mar 2021 12:42:28 +0900 Subject: [PATCH 46/72] cleanup --- src/portable/renesas/usba/dcd_usba.c | 102 ++++++++++++--------------- 1 file changed, 46 insertions(+), 56 deletions(-) diff --git a/src/portable/renesas/usba/dcd_usba.c b/src/portable/renesas/usba/dcd_usba.c index 844fa385..06ea1a3f 100644 --- a/src/portable/renesas/usba/dcd_usba.c +++ b/src/portable/renesas/usba/dcd_usba.c @@ -112,12 +112,11 @@ typedef union { typedef struct TU_ATTR_PACKED { - uintptr_t addr; - uint16_t length; - uint16_t remaining; + uintptr_t addr; /* the start address of a transfer data buffer */ + uint16_t length; /* the number of bytes in the buffer */ + uint16_t remaining; /* the number of bytes remaining in the buffer */ struct { - uint32_t ep : 8; - uint32_t data: 1; + uint32_t ep : 8; /* an assigned endpoint address */ uint32_t : 0; }; } pipe_state_t; @@ -125,7 +124,7 @@ typedef struct TU_ATTR_PACKED typedef struct { pipe_state_t pipe[9]; - uint8_t ep[2][16]; /* index for pipe number */ + uint8_t ep[2][16]; /* a lookup table for a pipe index from an endpoint address */ } dcd_data_t; //--------------------------------------------------------------------+ @@ -231,10 +230,10 @@ static unsigned select_pipe(unsigned num, unsigned attr) return wait_for_pipe_ready(); } -/* 1 less than 64 bytes were written - * 2 no bytes were written - * 0 mps bytes were written */ -static int write_fifo(volatile void *fifo, pipe_state_t* pipe, unsigned mps) +/* 1 less than mps bytes were written to FIFO + * 2 no bytes were written to FIFO + * 0 mps bytes were written to FIFO */ +static int fifo_write(volatile void *fifo, pipe_state_t* pipe, unsigned mps) { unsigned rem = pipe->remaining; if (!rem) return 2; @@ -261,9 +260,10 @@ static int write_fifo(volatile void *fifo, pipe_state_t* pipe, unsigned mps) return 0; } -/* 1 if the number of bytes read is less than mps bytes - * 0 otherwise */ -static int read_fifo(volatile void *fifo, pipe_state_t* pipe, unsigned mps, size_t len) +/* 1 less than mps bytes were read from FIFO + * 2 the end of the buffer reached. + * 0 mps bytes were read from FIFO */ +static int fifo_read(volatile void *fifo, pipe_state_t* pipe, unsigned mps, size_t len) { unsigned rem = pipe->remaining; if (!rem) return 2; @@ -294,7 +294,6 @@ static void process_setup_packet(uint8_t rhport) setup_packet[3] = USB0.USBLENG; USB0.INTSTS0.WORD = ~USB_IS0_VALID; dcd_event_setup_received(rhport, (const uint8_t*)&setup_packet[0], true); - // TU_LOG1("S\r\n"); } static void process_status_completion(uint8_t rhport) @@ -309,7 +308,6 @@ static void process_status_completion(uint8_t rhport) ep_addr = tu_edpt_addr(0, TUSB_DIR_OUT); } dcd_event_xfer_complete(rhport, ep_addr, 0, XFER_RESULT_SUCCESS, true); - // TU_LOG1("C\r\n"); } static bool process_edpt0_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, uint16_t total_bytes) @@ -317,11 +315,11 @@ static bool process_edpt0_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, (void)rhport; pipe_state_t *pipe = &_dcd.pipe[0]; - /* set fifo direction */ - if (ep_addr) { /* IN */ + /* configure fifo direction and access unit settings */ + if (ep_addr) { /* IN, 2 bytes */ USB0.CFIFOSEL.WORD = USB_FIFOSEL_TX | USB_FIFOSEL_MBW_16; while (!(USB0.CFIFOSEL.WORD & USB_FIFOSEL_TX)) ; - } else { /* OUT */ + } else { /* OUT, a byte */ USB0.CFIFOSEL.WORD = USB_FIFOSEL_MBW_8; while (USB0.CFIFOSEL.WORD & USB_FIFOSEL_TX) ; } @@ -329,21 +327,18 @@ static bool process_edpt0_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, pipe->addr = (uintptr_t)buffer; pipe->length = total_bytes; pipe->remaining = total_bytes; - pipe->data = USB0.DCPCTR.BIT.SQMON; if (ep_addr) { /* IN */ TU_ASSERT(USB0.DCPCTR.BIT.BSTS && (USB0.USBREQ.WORD & 0x80)); - if (write_fifo(&USB0.CFIFO.WORD, pipe, 64)) { + if (fifo_write(&USB0.CFIFO.WORD, pipe, 64)) { USB0.CFIFOCTR.WORD = USB_FIFOCTR_BVAL; } } USB0.DCPCTR.WORD = USB_PIPECTR_PID_BUF; - // TU_LOG1("X %x %d\r\n", ep_addr, total_bytes); } else { /* ZLP */ pipe->addr = 0; pipe->length = 0; pipe->remaining = 0; - pipe->data = USB0.DCPCTR.BIT.SQMON; USB0.DCPCTR.WORD = USB_PIPECTR_CCPL | USB_PIPECTR_PID_BUF; } return true; @@ -352,18 +347,10 @@ static bool process_edpt0_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, static void process_edpt0_bemp(uint8_t rhport) { pipe_state_t *pipe = &_dcd.pipe[0]; - unsigned data = pipe->data; - if (USB0.DCPCTR.BIT.SQMON == data) { - /* retry transfer */ - int r = write_fifo(&USB0.CFIFO.WORD, &_dcd.pipe[0], 64); - if (r) USB0.CFIFOCTR.WORD = USB_FIFOCTR_BVAL; - return; - } const unsigned rem = pipe->remaining; if (rem > 64) { pipe->remaining = rem - 64; - pipe->data = data ^ 1; - int r = write_fifo(&USB0.CFIFO.WORD, &_dcd.pipe[0], 64); + int r = fifo_write(&USB0.CFIFO.WORD, &_dcd.pipe[0], 64); if (r) USB0.CFIFOCTR.WORD = USB_FIFOCTR_BVAL; return; } @@ -376,7 +363,7 @@ static void process_edpt0_bemp(uint8_t rhport) static void process_edpt0_brdy(uint8_t rhport) { size_t len = USB0.CFIFOCTR.BIT.DTLN; - int cplt = read_fifo(&USB0.CFIFO.WORD, &_dcd.pipe[0], 64, len); + int cplt = fifo_read(&USB0.CFIFO.WORD, &_dcd.pipe[0], 64, len); if (cplt || (len < 64)) { if (2 != cplt) { USB0.CFIFOCTR.WORD = USB_FIFOCTR_BCLR; @@ -407,7 +394,7 @@ static bool process_pipe_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, if (dir) { /* IN */ USB0.D0FIFOSEL.WORD = num | USB_FIFOSEL_MBW_16; while (!(USB0.D0FIFOSEL.BIT.CURPIPE != num)) ; - int r = write_fifo(&USB0.D0FIFO.WORD, pipe, mps); + int r = fifo_write(&USB0.D0FIFO.WORD, pipe, mps); if (r) USB0.D0FIFOCTR.WORD = USB_FIFOCTR_BVAL; USB0.D0FIFOSEL.WORD = 0; } else { @@ -428,11 +415,29 @@ static bool process_pipe_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, static void process_pipe_brdy(uint8_t rhport, unsigned num) { pipe_state_t *pipe = &_dcd.pipe[num]; - if (!tu_edpt_dir(pipe->ep)) { + if (tu_edpt_dir(pipe->ep)) { /* IN */ + select_pipe(num, USB_FIFOSEL_MBW_16); + const unsigned mps = USB0.PIPEMAXP.WORD; + unsigned rem = pipe->remaining; + rem -= TU_MIN(rem, mps); + pipe->remaining = rem; + if (rem) { + int r = 0; + r = fifo_write(&USB0.D0FIFO.WORD, pipe, mps); + if (r) USB0.D0FIFOCTR.WORD = USB_FIFOCTR_BVAL; + USB0.D0FIFOSEL.WORD = 0; + return; + } + USB0.D0FIFOSEL.WORD = 0; + pipe->addr = 0; + pipe->remaining = 0; + dcd_event_xfer_complete(rhport, pipe->ep, pipe->length, + XFER_RESULT_SUCCESS, true); + } else { const unsigned ctr = select_pipe(num, USB_FIFOSEL_MBW_8); const unsigned len = ctr & USB_FIFOCTR_DTLN; const unsigned mps = USB0.PIPEMAXP.WORD; - int cplt = read_fifo(&USB0.D0FIFO.WORD, pipe, mps, len); + int cplt = fifo_read(&USB0.D0FIFO.WORD, pipe, mps, len); if (cplt || (len < mps)) { if (2 != cplt) { USB0.D0FIFO.WORD = USB_FIFOCTR_BCLR; @@ -444,24 +449,6 @@ static void process_pipe_brdy(uint8_t rhport, unsigned num) return; } USB0.D0FIFOSEL.WORD = 0; - } else { - select_pipe(num, USB_FIFOSEL_MBW_16); - const unsigned mps = USB0.PIPEMAXP.WORD; - unsigned rem = pipe->remaining; - rem -= TU_MIN(rem, mps); - pipe->remaining = rem; - if (rem) { - int r = 0; - r = write_fifo(&USB0.D0FIFO.WORD, pipe, mps); - if (r) USB0.D0FIFOCTR.WORD = USB_FIFOCTR_BVAL; - USB0.D0FIFOSEL.WORD = 0; - return; - } - USB0.D0FIFOSEL.WORD = 0; - pipe->addr = 0; - pipe->remaining = 0; - dcd_event_xfer_complete(rhport, pipe->ep, pipe->length, - XFER_RESULT_SUCCESS, true); } } @@ -492,7 +479,6 @@ static void process_bus_reset(uint8_t rhport) } tu_varclr(&_dcd); dcd_event_bus_reset(rhport, TUSB_SPEED_FULL, true); - // TU_LOG1("R\r\n"); } static void process_set_address(uint8_t rhport) @@ -674,10 +660,14 @@ void dcd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr) dcd_int_disable(rhport); *ctr = USB_PIPECTR_SQCLR; - if (ep_addr & TUSB_DIR_IN_MASK) { + if (tu_edpt_dir(ep_addr)) { /* IN */ *ctr = USB_PIPECTR_PID_BUF; } else { - /* TODO */ + const unsigned num = _dcd.ep[0][tu_edpt_number(ep_addr)]; + USB0.PIPESEL.WORD = num; + if (USB0.PIPECFG.BIT.TYPE != 1) { + *ctr = USB_PIPECTR_PID_BUF; + } } dcd_int_enable(rhport); } From 30687daf9b769f7795e4b17b9c7f8b88d3d11690 Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Sun, 28 Mar 2021 16:45:53 +0900 Subject: [PATCH 47/72] added a submodule dependency --- hw/bsp/gr_citrus/board.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/bsp/gr_citrus/board.mk b/hw/bsp/gr_citrus/board.mk index 06262184..9804f835 100644 --- a/hw/bsp/gr_citrus/board.mk +++ b/hw/bsp/gr_citrus/board.mk @@ -1,3 +1,5 @@ +DEPS_SUBMODULES += hw/mcu/renesas + CFLAGS += \ -nostartfiles \ -ffunction-sections \ From d8efef94611f5744b7e141f424f02b907accd5b7 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Mon, 29 Mar 2021 11:06:03 +0200 Subject: [PATCH 48/72] Add releases to Mynewt repository.yml This makes it possible to setup Mynewt project which checkouts specified version of tinyusb. --- repository.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/repository.yml b/repository.yml index 3325587b..16afbca5 100644 --- a/repository.yml +++ b/repository.yml @@ -1,5 +1,12 @@ repo.name: tinyusb repo.versions: "0.0.0": "master" + "0.5.0": "0.5.0" + "0.6.0": "0.6.0" + "0.7.0": "0.7.0" + "0.8.0": "0.8.0" + "0.9.0": "0.9.0" + + "0-dev": "0.0.0" # master + "0-latest": "0.9.0" # latest stable release - "0-dev": "0.0.0" From ef73a9864f5cdb33d959ffcc944aa317d1f45303 Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 29 Mar 2021 22:51:11 +0700 Subject: [PATCH 49/72] add suffix _s to object of assembly file --- examples/rules.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/rules.mk b/examples/rules.mk index 9265bb68..6f494f4b 100644 --- a/examples/rules.mk +++ b/examples/rules.mk @@ -52,7 +52,8 @@ SRC_S := $(SRC_S:.S=.s) # Due to GCC LTO bug https://bugs.launchpad.net/gcc-arm-embedded/+bug/1747966 # assembly file should be placed first in linking order -OBJ += $(addprefix $(BUILD)/obj/, $(SRC_S:.s=.o)) +# '_s' suffix is added to object of assembly file +OBJ += $(addprefix $(BUILD)/obj/, $(SRC_S:.s=_s.o)) OBJ += $(addprefix $(BUILD)/obj/, $(SRC_C:.c=.o)) # Verbose mode @@ -111,13 +112,13 @@ $(BUILD)/obj/%.o: %.c # ASM sources lower case .s vpath %.s . $(TOP) -$(BUILD)/obj/%.o: %.s +$(BUILD)/obj/%_s.o: %.s @echo AS $(notdir $@) @$(CC) -x assembler-with-cpp $(ASFLAGS) -c -o $@ $< # ASM sources upper case .S vpath %.S . $(TOP) -$(BUILD)/obj/%.o: %.S +$(BUILD)/obj/%_s.o: %.S @echo AS $(notdir $@) @$(CC) -x assembler-with-cpp $(ASFLAGS) -c -o $@ $< From 5a0c594c719a1bd86bf49ad60175be4d51154655 Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 29 Mar 2021 23:54:44 +0700 Subject: [PATCH 50/72] move rx63n into its own family --- hw/bsp/{ => rx63n/boards}/gr_citrus/board.mk | 4 ++-- hw/bsp/{ => rx63n/boards}/gr_citrus/gr_citrus.c | 0 hw/bsp/{ => rx63n/boards}/gr_citrus/hwinit.c | 0 hw/bsp/{ => rx63n/boards}/gr_citrus/r5f5631fd.ld | 0 hw/bsp/rx63n/family.mk | 1 + 5 files changed, 3 insertions(+), 2 deletions(-) rename hw/bsp/{ => rx63n/boards}/gr_citrus/board.mk (94%) rename hw/bsp/{ => rx63n/boards}/gr_citrus/gr_citrus.c (100%) rename hw/bsp/{ => rx63n/boards}/gr_citrus/hwinit.c (100%) rename hw/bsp/{ => rx63n/boards}/gr_citrus/r5f5631fd.ld (100%) create mode 100644 hw/bsp/rx63n/family.mk diff --git a/hw/bsp/gr_citrus/board.mk b/hw/bsp/rx63n/boards/gr_citrus/board.mk similarity index 94% rename from hw/bsp/gr_citrus/board.mk rename to hw/bsp/rx63n/boards/gr_citrus/board.mk index 9804f835..e33f3b50 100644 --- a/hw/bsp/gr_citrus/board.mk +++ b/hw/bsp/rx63n/boards/gr_citrus/board.mk @@ -35,14 +35,14 @@ endif MCU_DIR = hw/mcu/renesas/rx63n # All source paths should be relative to the top level. -LD_FILE = hw/bsp/$(BOARD)/r5f5631fd.ld +LD_FILE = $(BOARD_PATH)/r5f5631fd.ld SRC_C += \ src/portable/renesas/usba/dcd_usba.c \ $(MCU_DIR)/vects.c INC += \ - $(TOP)/hw/bsp/$(BOARD) \ + $(TOP)/$(BOARD_PATH) \ $(TOP)/$(MCU_DIR) SRC_S += $(MCU_DIR)/start.S diff --git a/hw/bsp/gr_citrus/gr_citrus.c b/hw/bsp/rx63n/boards/gr_citrus/gr_citrus.c similarity index 100% rename from hw/bsp/gr_citrus/gr_citrus.c rename to hw/bsp/rx63n/boards/gr_citrus/gr_citrus.c diff --git a/hw/bsp/gr_citrus/hwinit.c b/hw/bsp/rx63n/boards/gr_citrus/hwinit.c similarity index 100% rename from hw/bsp/gr_citrus/hwinit.c rename to hw/bsp/rx63n/boards/gr_citrus/hwinit.c diff --git a/hw/bsp/gr_citrus/r5f5631fd.ld b/hw/bsp/rx63n/boards/gr_citrus/r5f5631fd.ld similarity index 100% rename from hw/bsp/gr_citrus/r5f5631fd.ld rename to hw/bsp/rx63n/boards/gr_citrus/r5f5631fd.ld diff --git a/hw/bsp/rx63n/family.mk b/hw/bsp/rx63n/family.mk new file mode 100644 index 00000000..d3c743ed --- /dev/null +++ b/hw/bsp/rx63n/family.mk @@ -0,0 +1 @@ +include $(TOP)/$(BOARD_PATH)/board.mk \ No newline at end of file From 94d29d8578cd0baf2c629e0f9455cebd7c033896 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 30 Mar 2021 00:06:06 +0700 Subject: [PATCH 51/72] add build-renesas for rx63n --- .github/workflows/build.yml | 67 +++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f2b9ea3..3e50980c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -267,6 +267,73 @@ jobs: asset_name: ${{ matrix.family }}-tinyusb-${{ github.event.release.tag_name }}-examples.zip asset_content_type: application/zip + # --------------------------------------- + # Build Renesas family + # --------------------------------------- + build-renesas: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + family: + # Alphabetical order + - 'rx63n' + steps: + - name: Setup Python + uses: actions/setup-python@v2 + + - name: Checkout TinyUSB + uses: actions/checkout@v2 + + - name: Checkout common submodules in lib + run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip + + - name: Set Toolchain URL + run: echo >> $GITHUB_ENV TOOLCHAIN_URL=http://gcc-renesas.com/downloads/get.php?f=rx/8.3.0.202004-gnurx/gcc-8.3.0.202004-GNURX-ELF.run + + - name: Cache Toolchain + uses: actions/cache@v2 + id: cache-toolchain + with: + path: ~/cache/ + key: ${{ runner.os }}-21-03-30-${{ env.TOOLCHAIN_URL }} + + - name: Install Toolchain + if: steps.cache-toolchain.outputs.cache-hit != 'true' + run: | + mkdir -p ~/cache/toolchain/gnurx + wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.run + chmod +x toolchain.run + ./toolchain.run -p ~/cache/toolchain/gnurx -y + + - name: Set Toolchain Path + run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin` + + - name: Build + run: python3 tools/build_family.py ${{ matrix.family }} + + - uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.family }}-tinyusb-examples + path: _bin/ + + - name: Create Release Asset + if: ${{ github.event_name == 'release' }} + run: | + cd _bin/ + zip -r ../${{ matrix.family }}-tinyusb-${{ github.event.release.tag_name }}-examples.zip * + + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + if: ${{ github.event_name == 'release' }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ${{ matrix.family }}-tinyusb-${{ github.event.release.tag_name }}-examples.zip + asset_name: ${{ matrix.family }}-tinyusb-${{ github.event.release.tag_name }}-examples.zip + asset_content_type: application/zip + # --------------------------------------- # Build all no-family (opharned) boards # --------------------------------------- From 2e4657d11178ba590131fb35c10aa1fe491d99a8 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 30 Mar 2021 01:09:17 +0700 Subject: [PATCH 52/72] change suffix to _asm to be more explicit --- examples/rules.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/rules.mk b/examples/rules.mk index 6f494f4b..a19cd678 100644 --- a/examples/rules.mk +++ b/examples/rules.mk @@ -52,8 +52,8 @@ SRC_S := $(SRC_S:.S=.s) # Due to GCC LTO bug https://bugs.launchpad.net/gcc-arm-embedded/+bug/1747966 # assembly file should be placed first in linking order -# '_s' suffix is added to object of assembly file -OBJ += $(addprefix $(BUILD)/obj/, $(SRC_S:.s=_s.o)) +# '_asm' suffix is added to object of assembly file +OBJ += $(addprefix $(BUILD)/obj/, $(SRC_S:.s=_asm.o)) OBJ += $(addprefix $(BUILD)/obj/, $(SRC_C:.c=.o)) # Verbose mode @@ -112,13 +112,13 @@ $(BUILD)/obj/%.o: %.c # ASM sources lower case .s vpath %.s . $(TOP) -$(BUILD)/obj/%_s.o: %.s +$(BUILD)/obj/%_asm.o: %.s @echo AS $(notdir $@) @$(CC) -x assembler-with-cpp $(ASFLAGS) -c -o $@ $< # ASM sources upper case .S vpath %.S . $(TOP) -$(BUILD)/obj/%_s.o: %.S +$(BUILD)/obj/%_asm.o: %.S @echo AS $(notdir $@) @$(CC) -x assembler-with-cpp $(ASFLAGS) -c -o $@ $< From d135825e9ca36bcf50b3476e5dfdc1f74ae1c101 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 30 Mar 2021 21:12:56 +0700 Subject: [PATCH 53/72] add hid keys from 0x6B to 0xA4 --- src/class/hid/hid.h | 283 ++++++++++++++++++++++++++------------------ 1 file changed, 171 insertions(+), 112 deletions(-) diff --git a/src/class/hid/hid.h b/src/class/hid/hid.h index a7db087a..79b4f48b 100644 --- a/src/class/hid/hid.h +++ b/src/class/hid/hid.h @@ -303,118 +303,177 @@ typedef enum //--------------------------------------------------------------------+ // HID KEYCODE //--------------------------------------------------------------------+ -#define HID_KEY_NONE 0x00 -#define HID_KEY_A 0x04 -#define HID_KEY_B 0x05 -#define HID_KEY_C 0x06 -#define HID_KEY_D 0x07 -#define HID_KEY_E 0x08 -#define HID_KEY_F 0x09 -#define HID_KEY_G 0x0A -#define HID_KEY_H 0x0B -#define HID_KEY_I 0x0C -#define HID_KEY_J 0x0D -#define HID_KEY_K 0x0E -#define HID_KEY_L 0x0F -#define HID_KEY_M 0x10 -#define HID_KEY_N 0x11 -#define HID_KEY_O 0x12 -#define HID_KEY_P 0x13 -#define HID_KEY_Q 0x14 -#define HID_KEY_R 0x15 -#define HID_KEY_S 0x16 -#define HID_KEY_T 0x17 -#define HID_KEY_U 0x18 -#define HID_KEY_V 0x19 -#define HID_KEY_W 0x1A -#define HID_KEY_X 0x1B -#define HID_KEY_Y 0x1C -#define HID_KEY_Z 0x1D -#define HID_KEY_1 0x1E -#define HID_KEY_2 0x1F -#define HID_KEY_3 0x20 -#define HID_KEY_4 0x21 -#define HID_KEY_5 0x22 -#define HID_KEY_6 0x23 -#define HID_KEY_7 0x24 -#define HID_KEY_8 0x25 -#define HID_KEY_9 0x26 -#define HID_KEY_0 0x27 -#define HID_KEY_RETURN 0x28 -#define HID_KEY_ESCAPE 0x29 -#define HID_KEY_BACKSPACE 0x2A -#define HID_KEY_TAB 0x2B -#define HID_KEY_SPACE 0x2C -#define HID_KEY_MINUS 0x2D -#define HID_KEY_EQUAL 0x2E -#define HID_KEY_BRACKET_LEFT 0x2F -#define HID_KEY_BRACKET_RIGHT 0x30 -#define HID_KEY_BACKSLASH 0x31 -#define HID_KEY_EUROPE_1 0x32 -#define HID_KEY_SEMICOLON 0x33 -#define HID_KEY_APOSTROPHE 0x34 -#define HID_KEY_GRAVE 0x35 -#define HID_KEY_COMMA 0x36 -#define HID_KEY_PERIOD 0x37 -#define HID_KEY_SLASH 0x38 -#define HID_KEY_CAPS_LOCK 0x39 -#define HID_KEY_F1 0x3A -#define HID_KEY_F2 0x3B -#define HID_KEY_F3 0x3C -#define HID_KEY_F4 0x3D -#define HID_KEY_F5 0x3E -#define HID_KEY_F6 0x3F -#define HID_KEY_F7 0x40 -#define HID_KEY_F8 0x41 -#define HID_KEY_F9 0x42 -#define HID_KEY_F10 0x43 -#define HID_KEY_F11 0x44 -#define HID_KEY_F12 0x45 -#define HID_KEY_PRINT_SCREEN 0x46 -#define HID_KEY_SCROLL_LOCK 0x47 -#define HID_KEY_PAUSE 0x48 -#define HID_KEY_INSERT 0x49 -#define HID_KEY_HOME 0x4A -#define HID_KEY_PAGE_UP 0x4B -#define HID_KEY_DELETE 0x4C -#define HID_KEY_END 0x4D -#define HID_KEY_PAGE_DOWN 0x4E -#define HID_KEY_ARROW_RIGHT 0x4F -#define HID_KEY_ARROW_LEFT 0x50 -#define HID_KEY_ARROW_DOWN 0x51 -#define HID_KEY_ARROW_UP 0x52 -#define HID_KEY_NUM_LOCK 0x53 -#define HID_KEY_KEYPAD_DIVIDE 0x54 -#define HID_KEY_KEYPAD_MULTIPLY 0x55 -#define HID_KEY_KEYPAD_SUBTRACT 0x56 -#define HID_KEY_KEYPAD_ADD 0x57 -#define HID_KEY_KEYPAD_ENTER 0x58 -#define HID_KEY_KEYPAD_1 0x59 -#define HID_KEY_KEYPAD_2 0x5A -#define HID_KEY_KEYPAD_3 0x5B -#define HID_KEY_KEYPAD_4 0x5C -#define HID_KEY_KEYPAD_5 0x5D -#define HID_KEY_KEYPAD_6 0x5E -#define HID_KEY_KEYPAD_7 0x5F -#define HID_KEY_KEYPAD_8 0x60 -#define HID_KEY_KEYPAD_9 0x61 -#define HID_KEY_KEYPAD_0 0x62 -#define HID_KEY_KEYPAD_DECIMAL 0x63 -#define HID_KEY_EUROPE_2 0x64 -#define HID_KEY_APPLICATION 0x65 -#define HID_KEY_POWER 0x66 -#define HID_KEY_KEYPAD_EQUAL 0x67 -#define HID_KEY_F13 0x68 -#define HID_KEY_F14 0x69 -#define HID_KEY_F15 0x6A -#define HID_KEY_CONTROL_LEFT 0xE0 -#define HID_KEY_SHIFT_LEFT 0xE1 -#define HID_KEY_ALT_LEFT 0xE2 -#define HID_KEY_GUI_LEFT 0xE3 -#define HID_KEY_CONTROL_RIGHT 0xE4 -#define HID_KEY_SHIFT_RIGHT 0xE5 -#define HID_KEY_ALT_RIGHT 0xE6 -#define HID_KEY_GUI_RIGHT 0xE7 +#define HID_KEY_NONE 0x00 +#define HID_KEY_A 0x04 +#define HID_KEY_B 0x05 +#define HID_KEY_C 0x06 +#define HID_KEY_D 0x07 +#define HID_KEY_E 0x08 +#define HID_KEY_F 0x09 +#define HID_KEY_G 0x0A +#define HID_KEY_H 0x0B +#define HID_KEY_I 0x0C +#define HID_KEY_J 0x0D +#define HID_KEY_K 0x0E +#define HID_KEY_L 0x0F +#define HID_KEY_M 0x10 +#define HID_KEY_N 0x11 +#define HID_KEY_O 0x12 +#define HID_KEY_P 0x13 +#define HID_KEY_Q 0x14 +#define HID_KEY_R 0x15 +#define HID_KEY_S 0x16 +#define HID_KEY_T 0x17 +#define HID_KEY_U 0x18 +#define HID_KEY_V 0x19 +#define HID_KEY_W 0x1A +#define HID_KEY_X 0x1B +#define HID_KEY_Y 0x1C +#define HID_KEY_Z 0x1D +#define HID_KEY_1 0x1E +#define HID_KEY_2 0x1F +#define HID_KEY_3 0x20 +#define HID_KEY_4 0x21 +#define HID_KEY_5 0x22 +#define HID_KEY_6 0x23 +#define HID_KEY_7 0x24 +#define HID_KEY_8 0x25 +#define HID_KEY_9 0x26 +#define HID_KEY_0 0x27 +#define HID_KEY_RETURN 0x28 +#define HID_KEY_ESCAPE 0x29 +#define HID_KEY_BACKSPACE 0x2A +#define HID_KEY_TAB 0x2B +#define HID_KEY_SPACE 0x2C +#define HID_KEY_MINUS 0x2D +#define HID_KEY_EQUAL 0x2E +#define HID_KEY_BRACKET_LEFT 0x2F +#define HID_KEY_BRACKET_RIGHT 0x30 +#define HID_KEY_BACKSLASH 0x31 +#define HID_KEY_EUROPE_1 0x32 +#define HID_KEY_SEMICOLON 0x33 +#define HID_KEY_APOSTROPHE 0x34 +#define HID_KEY_GRAVE 0x35 +#define HID_KEY_COMMA 0x36 +#define HID_KEY_PERIOD 0x37 +#define HID_KEY_SLASH 0x38 +#define HID_KEY_CAPS_LOCK 0x39 +#define HID_KEY_F1 0x3A +#define HID_KEY_F2 0x3B +#define HID_KEY_F3 0x3C +#define HID_KEY_F4 0x3D +#define HID_KEY_F5 0x3E +#define HID_KEY_F6 0x3F +#define HID_KEY_F7 0x40 +#define HID_KEY_F8 0x41 +#define HID_KEY_F9 0x42 +#define HID_KEY_F10 0x43 +#define HID_KEY_F11 0x44 +#define HID_KEY_F12 0x45 +#define HID_KEY_PRINT_SCREEN 0x46 +#define HID_KEY_SCROLL_LOCK 0x47 +#define HID_KEY_PAUSE 0x48 +#define HID_KEY_INSERT 0x49 +#define HID_KEY_HOME 0x4A +#define HID_KEY_PAGE_UP 0x4B +#define HID_KEY_DELETE 0x4C +#define HID_KEY_END 0x4D +#define HID_KEY_PAGE_DOWN 0x4E +#define HID_KEY_ARROW_RIGHT 0x4F +#define HID_KEY_ARROW_LEFT 0x50 +#define HID_KEY_ARROW_DOWN 0x51 +#define HID_KEY_ARROW_UP 0x52 +#define HID_KEY_NUM_LOCK 0x53 +#define HID_KEY_KEYPAD_DIVIDE 0x54 +#define HID_KEY_KEYPAD_MULTIPLY 0x55 +#define HID_KEY_KEYPAD_SUBTRACT 0x56 +#define HID_KEY_KEYPAD_ADD 0x57 +#define HID_KEY_KEYPAD_ENTER 0x58 +#define HID_KEY_KEYPAD_1 0x59 +#define HID_KEY_KEYPAD_2 0x5A +#define HID_KEY_KEYPAD_3 0x5B +#define HID_KEY_KEYPAD_4 0x5C +#define HID_KEY_KEYPAD_5 0x5D +#define HID_KEY_KEYPAD_6 0x5E +#define HID_KEY_KEYPAD_7 0x5F +#define HID_KEY_KEYPAD_8 0x60 +#define HID_KEY_KEYPAD_9 0x61 +#define HID_KEY_KEYPAD_0 0x62 +#define HID_KEY_KEYPAD_DECIMAL 0x63 +#define HID_KEY_EUROPE_2 0x64 +#define HID_KEY_APPLICATION 0x65 +#define HID_KEY_POWER 0x66 +#define HID_KEY_KEYPAD_EQUAL 0x67 +#define HID_KEY_F13 0x68 +#define HID_KEY_F14 0x69 +#define HID_KEY_F15 0x6A +#define HID_KEY_F16 0x6B +#define HID_KEY_F17 0x6C +#define HID_KEY_F18 0x6D +#define HID_KEY_F19 0x6E +#define HID_KEY_F20 0x6F +#define HID_KEY_F21 0x70 +#define HID_KEY_F22 0x71 +#define HID_KEY_F23 0x72 +#define HID_KEY_F24 0x73 +#define HID_KEY_EXECUTE 0x74 +#define HID_KEY_HELP 0x75 +#define HID_KEY_MENU 0x76 +#define HID_KEY_SELECT 0x77 +#define HID_KEY_STOP 0x78 +#define HID_KEY_AGAIN 0x79 +#define HID_KEY_UNDO 0x7A +#define HID_KEY_CUT 0x7B +#define HID_KEY_COPY 0x7C +#define HID_KEY_PASTE 0x7D +#define HID_KEY_FIND 0x7E +#define HID_KEY_MUTE 0x7F +#define HID_KEY_VOLUME_UP 0x80 +#define HID_KEY_VOLUME_DOWN 0x81 +#define HID_KEY_LOCKING_CAPS_LOCK 0x82 +#define HID_KEY_LOCKING_NUM_LOCK 0x83 +#define HID_KEY_LOCKING_SCROLL_LOCK 0x84 +#define HID_KEY_KEYPAD_COMMA 0x85 +#define HID_KEY_KEYPAD_EQUAL_SIGN 0x86 +#define HID_KEY_KANJI1 0x87 +#define HID_KEY_KANJI2 0x88 +#define HID_KEY_KANJI3 0x89 +#define HID_KEY_KANJI4 0x8A +#define HID_KEY_KANJI5 0x8B +#define HID_KEY_KANJI6 0x8C +#define HID_KEY_KANJI7 0x8D +#define HID_KEY_KANJI8 0x8E +#define HID_KEY_KANJI9 0x8F +#define HID_KEY_LANG1 0x90 +#define HID_KEY_LANG2 0x91 +#define HID_KEY_LANG3 0x92 +#define HID_KEY_LANG4 0x93 +#define HID_KEY_LANG5 0x94 +#define HID_KEY_LANG6 0x95 +#define HID_KEY_LANG7 0x96 +#define HID_KEY_LANG8 0x97 +#define HID_KEY_LANG9 0x98 +#define HID_KEY_ALTERNATE_ERASE 0x99 +#define HID_KEY_SYSREQ_ATTENTION 0x9A +#define HID_KEY_CANCEL 0x9B +#define HID_KEY_CLEAR 0x9C +#define HID_KEY_PRIOR 0x9D +#define HID_KEY_RETURN 0x9E +#define HID_KEY_SEPARATOR 0x9F +#define HID_KEY_OUT 0xA0 +#define HID_KEY_OPER 0xA1 +#define HID_KEY_CLEAR_AGAIN 0xA2 +#define HID_KEY_CRSEL_PROPS 0xA3 +#define HID_KEY_EXSEL 0xA4 +// RESERVED 0xA5-DF +#define HID_KEY_CONTROL_LEFT 0xE0 +#define HID_KEY_SHIFT_LEFT 0xE1 +#define HID_KEY_ALT_LEFT 0xE2 +#define HID_KEY_GUI_LEFT 0xE3 +#define HID_KEY_CONTROL_RIGHT 0xE4 +#define HID_KEY_SHIFT_RIGHT 0xE5 +#define HID_KEY_ALT_RIGHT 0xE6 +#define HID_KEY_GUI_RIGHT 0xE7 //--------------------------------------------------------------------+ From 89a911ee43f2c7a17303b58739dc8b22cbd56294 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 30 Mar 2021 21:26:35 +0700 Subject: [PATCH 54/72] correct hid key enter = 0x28, return = 0x9E --- src/class/hid/hid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class/hid/hid.h b/src/class/hid/hid.h index 79b4f48b..351a4d60 100644 --- a/src/class/hid/hid.h +++ b/src/class/hid/hid.h @@ -340,7 +340,7 @@ typedef enum #define HID_KEY_8 0x25 #define HID_KEY_9 0x26 #define HID_KEY_0 0x27 -#define HID_KEY_RETURN 0x28 +#define HID_KEY_ENTER 0x28 #define HID_KEY_ESCAPE 0x29 #define HID_KEY_BACKSPACE 0x2A #define HID_KEY_TAB 0x2B From c5aa661c892159b2eced9b2e3c1a4a1d8f92b1f6 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 30 Mar 2021 23:54:17 +0700 Subject: [PATCH 55/72] rename tud_midi_receive/send to tud_midi_packet_read/write --- src/class/midi/midi_device.c | 6 +++--- src/class/midi/midi_device.h | 17 +++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/class/midi/midi_device.c b/src/class/midi/midi_device.c index 29019cc1..3772c475 100644 --- a/src/class/midi/midi_device.c +++ b/src/class/midi/midi_device.c @@ -127,7 +127,7 @@ uint32_t tud_midi_n_read(uint8_t itf, uint8_t cable_num, void* buffer, uint32_t // Fill empty buffer if (midi->read_buffer_length == 0) { - if (!tud_midi_n_receive(itf, midi->read_buffer)) return 0; + if (!tud_midi_n_packet_read(itf, midi->read_buffer)) return 0; uint8_t code_index = midi->read_buffer[0] & 0x0f; // We always copy over the first byte. @@ -166,7 +166,7 @@ void tud_midi_n_read_flush (uint8_t itf, uint8_t cable_num) _prep_out_transaction(p_midi); } -bool tud_midi_n_receive (uint8_t itf, uint8_t packet[4]) +bool tud_midi_n_packet_read (uint8_t itf, uint8_t packet[4]) { midid_interface_t* p_midi = &_midid_itf[itf]; uint32_t num_read = tu_fifo_read_n(&p_midi->rx_ff, packet, 4); @@ -278,7 +278,7 @@ uint32_t tud_midi_n_write(uint8_t itf, uint8_t cable_num, uint8_t const* buffer, return i; } -bool tud_midi_n_send (uint8_t itf, uint8_t const packet[4]) +bool tud_midi_n_packet_write (uint8_t itf, uint8_t const packet[4]) { midid_interface_t* midi = &_midid_itf[itf]; if (midi->itf_num == 0) { diff --git a/src/class/midi/midi_device.h b/src/class/midi/midi_device.h index 5e7df80a..f76554c7 100644 --- a/src/class/midi/midi_device.h +++ b/src/class/midi/midi_device.h @@ -68,8 +68,8 @@ uint32_t tud_midi_n_write (uint8_t itf, uint8_t cable_num, uint8_t const* b static inline uint32_t tud_midi_n_write24 (uint8_t itf, uint8_t cable_num, uint8_t b1, uint8_t b2, uint8_t b3); -bool tud_midi_n_receive (uint8_t itf, uint8_t packet[4]); -bool tud_midi_n_send (uint8_t itf, uint8_t const packet[4]); +bool tud_midi_n_packet_read (uint8_t itf, uint8_t packet[4]); +bool tud_midi_n_packet_write (uint8_t itf, uint8_t const packet[4]); //--------------------------------------------------------------------+ // Application API (Single Interface) @@ -80,8 +80,9 @@ static inline uint32_t tud_midi_read (void* buffer, uint32_t bufsize); static inline void tud_midi_read_flush (void); static inline uint32_t tud_midi_write (uint8_t cable_num, uint8_t const* buffer, uint32_t bufsize); static inline uint32_t tud_midi_write24 (uint8_t cable_num, uint8_t b1, uint8_t b2, uint8_t b3); -static inline bool tud_midi_receive (uint8_t packet[4]); -static inline bool tud_midi_send (uint8_t const packet[4]); + +static inline bool tud_midi_packet_read (uint8_t packet[4]); +static inline bool tud_midi_packet_write(uint8_t const packet[4]); //--------------------------------------------------------------------+ // Application Callback API (weak is optional) @@ -129,14 +130,14 @@ static inline uint32_t tud_midi_write24 (uint8_t cable_num, uint8_t b1, uint8_t return tud_midi_write(cable_num, msg, 3); } -static inline bool tud_midi_receive (uint8_t packet[4]) +static inline bool tud_midi_packet_read (uint8_t packet[4]) { - return tud_midi_n_receive(0, packet); + return tud_midi_n_packet_read(0, packet); } -static inline bool tud_midi_send (uint8_t const packet[4]) +static inline bool tud_midi_packet_write (uint8_t const packet[4]) { - return tud_midi_n_send(0, packet); + return tud_midi_n_packet_write(0, packet); } //--------------------------------------------------------------------+ From b05084e406b50c6378572974e47d7e2ec15f2045 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 30 Mar 2021 23:56:55 +0700 Subject: [PATCH 56/72] remove tud_midi_read_flush() --- src/class/midi/midi_device.c | 8 -------- src/class/midi/midi_device.h | 7 ------- 2 files changed, 15 deletions(-) diff --git a/src/class/midi/midi_device.c b/src/class/midi/midi_device.c index 3772c475..48e5a8e6 100644 --- a/src/class/midi/midi_device.c +++ b/src/class/midi/midi_device.c @@ -158,14 +158,6 @@ uint32_t tud_midi_n_read(uint8_t itf, uint8_t cable_num, void* buffer, uint32_t return n; } -void tud_midi_n_read_flush (uint8_t itf, uint8_t cable_num) -{ - (void) cable_num; - midid_interface_t* p_midi = &_midid_itf[itf]; - tu_fifo_clear(&p_midi->rx_ff); - _prep_out_transaction(p_midi); -} - bool tud_midi_n_packet_read (uint8_t itf, uint8_t packet[4]) { midid_interface_t* p_midi = &_midid_itf[itf]; diff --git a/src/class/midi/midi_device.h b/src/class/midi/midi_device.h index f76554c7..1060fd77 100644 --- a/src/class/midi/midi_device.h +++ b/src/class/midi/midi_device.h @@ -62,7 +62,6 @@ bool tud_midi_n_mounted (uint8_t itf); uint32_t tud_midi_n_available (uint8_t itf, uint8_t cable_num); uint32_t tud_midi_n_read (uint8_t itf, uint8_t cable_num, void* buffer, uint32_t bufsize); -void tud_midi_n_read_flush (uint8_t itf, uint8_t cable_num); uint32_t tud_midi_n_write (uint8_t itf, uint8_t cable_num, uint8_t const* buffer, uint32_t bufsize); static inline @@ -77,7 +76,6 @@ bool tud_midi_n_packet_write (uint8_t itf, uint8_t const packet[4]); static inline bool tud_midi_mounted (void); static inline uint32_t tud_midi_available (void); static inline uint32_t tud_midi_read (void* buffer, uint32_t bufsize); -static inline void tud_midi_read_flush (void); static inline uint32_t tud_midi_write (uint8_t cable_num, uint8_t const* buffer, uint32_t bufsize); static inline uint32_t tud_midi_write24 (uint8_t cable_num, uint8_t b1, uint8_t b2, uint8_t b3); @@ -114,11 +112,6 @@ static inline uint32_t tud_midi_read (void* buffer, uint32_t bufsize) return tud_midi_n_read(0, 0, buffer, bufsize); } -static inline void tud_midi_read_flush (void) -{ - tud_midi_n_read_flush(0, 0); -} - static inline uint32_t tud_midi_write (uint8_t cable_num, uint8_t const* buffer, uint32_t bufsize) { return tud_midi_n_write(0, cable_num, buffer, bufsize); From 949ff791e0222d9d89fe54b7cab036125997b66e Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 31 Mar 2021 00:34:09 +0700 Subject: [PATCH 57/72] code format --- src/class/midi/midi_device.c | 133 ++++++++++++++++++++--------------- 1 file changed, 78 insertions(+), 55 deletions(-) diff --git a/src/class/midi/midi_device.c b/src/class/midi/midi_device.c index 48e5a8e6..1ff81c39 100644 --- a/src/class/midi/midi_device.c +++ b/src/class/midi/midi_device.c @@ -200,67 +200,90 @@ static uint32_t write_flush(midid_interface_t* midi) uint32_t tud_midi_n_write(uint8_t itf, uint8_t cable_num, uint8_t const* buffer, uint32_t bufsize) { midid_interface_t* midi = &_midid_itf[itf]; - if (midi->itf_num == 0) { - return 0; - } + TU_VERIFY(midi->itf_num, 0); uint32_t i = 0; - while (i < bufsize) { + while ( i < bufsize ) + { uint8_t data = buffer[i]; - if (midi->write_buffer_length == 0) { - uint8_t msg = data >> 4; - midi->write_buffer[1] = data; + if ( midi->write_buffer_length == 0 ) + { + uint8_t msg = data >> 4; + midi->write_buffer[1] = data; + midi->write_buffer_length = 2; + // Check to see if we're still in a SysEx transmit. + if ( midi->write_buffer[0] == 0x4 ) + { + if ( data == 0xf7 ) + { + midi->write_buffer[0] = 0x5; + midi->write_target_length = 2; + } + else + { + midi->write_target_length = 4; + } + } + else if ( (msg >= 0x8 && msg <= 0xB) || msg == 0xE ) + { + midi->write_buffer[0] = cable_num << 4 | msg; + midi->write_target_length = 4; + } + else if ( msg == 0xf ) + { + if ( data == 0xf0 ) + { + midi->write_buffer[0] = 0x4; + midi->write_target_length = 4; + } + else if ( data == 0xf1 || data == 0xf3 ) + { + midi->write_buffer[0] = 0x2; + midi->write_target_length = 3; + } + else if ( data == 0xf2 ) + { + midi->write_buffer[0] = 0x3; + midi->write_target_length = 4; + } + else + { + midi->write_buffer[0] = 0x5; + midi->write_target_length = 2; + } + } + else + { + // Pack individual bytes if we don't support packing them into words. + midi->write_buffer[0] = cable_num << 4 | 0xf; + midi->write_buffer[2] = 0; + midi->write_buffer[3] = 0; midi->write_buffer_length = 2; - // Check to see if we're still in a SysEx transmit. - if (midi->write_buffer[0] == 0x4) { - if (data == 0xf7) { - midi->write_buffer[0] = 0x5; - midi->write_target_length = 2; - } else { - midi->write_target_length = 4; - } - } else if ((msg >= 0x8 && msg <= 0xB) || msg == 0xE) { - midi->write_buffer[0] = cable_num << 4 | msg; - midi->write_target_length = 4; - } else if (msg == 0xf) { - if (data == 0xf0) { - midi->write_buffer[0] = 0x4; - midi->write_target_length = 4; - } else if (data == 0xf1 || data == 0xf3) { - midi->write_buffer[0] = 0x2; - midi->write_target_length = 3; - } else if (data == 0xf2) { - midi->write_buffer[0] = 0x3; - midi->write_target_length = 4; - } else { - midi->write_buffer[0] = 0x5; - midi->write_target_length = 2; - } - } else { - // Pack individual bytes if we don't support packing them into words. - midi->write_buffer[0] = cable_num << 4 | 0xf; - midi->write_buffer[2] = 0; - midi->write_buffer[3] = 0; - midi->write_buffer_length = 2; - midi->write_target_length = 2; - } - } else { - midi->write_buffer[midi->write_buffer_length] = data; - midi->write_buffer_length += 1; - // See if this byte ends a SysEx. - if (midi->write_buffer[0] == 0x4 && data == 0xf7) { - midi->write_buffer[0] = 0x4 + (midi->write_buffer_length - 1); - midi->write_target_length = midi->write_buffer_length; - } + midi->write_target_length = 2; + } + } + else + { + TU_ASSERT(midi->write_buffer_length < 4, 0); + midi->write_buffer[midi->write_buffer_length] = data; + midi->write_buffer_length += 1; + // See if this byte ends a SysEx. + if ( midi->write_buffer[0] == 0x4 && data == 0xf7 ) + { + midi->write_buffer[0] = 0x4 + (midi->write_buffer_length - 1); + midi->write_target_length = midi->write_buffer_length; + } } - if (midi->write_buffer_length == midi->write_target_length) { - uint16_t written = tu_fifo_write_n(&midi->tx_ff, midi->write_buffer, 4); - if (written < 4) { - TU_ASSERT( written == 0 ); - break; - } - midi->write_buffer_length = 0; + if ( midi->write_buffer_length == midi->write_target_length ) + { + uint16_t written = tu_fifo_write_n(&midi->tx_ff, midi->write_buffer, 4); + if ( written < 4 ) + { + TU_ASSERT(written == 0); + break; + } + midi->write_buffer_length = 0; } i++; } From 74c8887c8eb22c7bc457dc7e4381061241d2fa84 Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Wed, 31 Mar 2021 21:50:53 +0900 Subject: [PATCH 58/72] removed a submodule for Renesas --- .gitmodules | 3 --- hw/mcu/renesas | 1 - 2 files changed, 4 deletions(-) delete mode 160000 hw/mcu/renesas diff --git a/.gitmodules b/.gitmodules index e075e0c6..1a5ae2c5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -116,6 +116,3 @@ [submodule "hw/mcu/silabs/cmsis-dfp-efm32gg12b"] path = hw/mcu/silabs/cmsis-dfp-efm32gg12b url = https://github.com/cmsis-packs/cmsis-dfp-efm32gg12b -[submodule "hw/mcu/renesas"] - path = hw/mcu/renesas - url = https://github.com/kkitayam/rx_device.git diff --git a/hw/mcu/renesas b/hw/mcu/renesas deleted file mode 160000 index 4a51dfe6..00000000 --- a/hw/mcu/renesas +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4a51dfe6ecdf936d2d89f223f069e24a2d109207 From 25057022e3bb74097849e86c90f0eb4b35b90394 Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Wed, 31 Mar 2021 21:53:15 +0900 Subject: [PATCH 59/72] add a submodule of Renesas RX family to `hw/mcu/renesas/rx` --- .gitmodules | 3 +++ hw/bsp/rx63n/boards/gr_citrus/board.mk | 4 ++-- hw/mcu/renesas/rx | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) create mode 160000 hw/mcu/renesas/rx diff --git a/.gitmodules b/.gitmodules index 1a5ae2c5..c0dd871f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -116,3 +116,6 @@ [submodule "hw/mcu/silabs/cmsis-dfp-efm32gg12b"] path = hw/mcu/silabs/cmsis-dfp-efm32gg12b url = https://github.com/cmsis-packs/cmsis-dfp-efm32gg12b +[submodule "hw/mcu/renesas/rx"] + path = hw/mcu/renesas/rx + url = https://github.com/kkitayam/rx_device.git diff --git a/hw/bsp/rx63n/boards/gr_citrus/board.mk b/hw/bsp/rx63n/boards/gr_citrus/board.mk index e33f3b50..feab5b5e 100644 --- a/hw/bsp/rx63n/boards/gr_citrus/board.mk +++ b/hw/bsp/rx63n/boards/gr_citrus/board.mk @@ -1,4 +1,4 @@ -DEPS_SUBMODULES += hw/mcu/renesas +DEPS_SUBMODULES += hw/mcu/renesas/rx CFLAGS += \ -nostartfiles \ @@ -32,7 +32,7 @@ CFLAGS += -nostdinc \ LIBS += -loptc -loptm endif -MCU_DIR = hw/mcu/renesas/rx63n +MCU_DIR = hw/mcu/renesas/rx/rx63n # All source paths should be relative to the top level. LD_FILE = $(BOARD_PATH)/r5f5631fd.ld diff --git a/hw/mcu/renesas/rx b/hw/mcu/renesas/rx new file mode 160000 index 00000000..4a51dfe6 --- /dev/null +++ b/hw/mcu/renesas/rx @@ -0,0 +1 @@ +Subproject commit 4a51dfe6ecdf936d2d89f223f069e24a2d109207 From ff2978d95fe80ec7abcabbc6c5a451f6b998dae2 Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Wed, 31 Mar 2021 22:15:03 +0900 Subject: [PATCH 60/72] added comments for JLink connection work. --- hw/bsp/rx63n/boards/gr_citrus/gr_citrus.c | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/hw/bsp/rx63n/boards/gr_citrus/gr_citrus.c b/hw/bsp/rx63n/boards/gr_citrus/gr_citrus.c index aadd4139..6697012a 100644 --- a/hw/bsp/rx63n/boards/gr_citrus/gr_citrus.c +++ b/hw/bsp/rx63n/boards/gr_citrus/gr_citrus.c @@ -24,6 +24,38 @@ * This file is part of the TinyUSB stack. */ +/* How to connect JLink and GR-CITRUS + * + * GR-CITRUS needs to solder some pads to enable JTAG interface. + * - Short the following pads individually with solder. + * - J4 + * - J5 + * - Short EMLE pad and 3.3V(GR-CITRUS pin name) with a wire. + * + * The pads are [the back side of GR-CITRUS](https://www.slideshare.net/MinaoYamamoto/grcitrusrx631/2). + * + * Connet the pins between GR-CITRUS and JLink as follows. + * + * | JTAG Function | GR-CITRUS pin name| JLink pin No.| note | + * |:-------------:|:-----------------:|:------------:|:--------:| + * | VTref | 3.3V | 1 | | + * | TRST | 5 | 3 | | + * | GND | GND | 4 | | + * | TDI | 3 | 5 | | + * | TMS | 2 | 7 | | + * | TCK | 14 | 9 | short J4 | + * | TDO | 9 | 13 | short J5 | + * | nRES | RST | 15 | | + * + * JLink firmware needs to update to V6.96 or newer version to avoid + * [a bug](https://forum.segger.com/index.php/Thread/7758-SOLVED-Bug-in-JLink-from-V6-88b-regarding-RX65N) + * regarding downloading. + * + * When using SEGGER RTT, `RX_NEWLIB=0` should be added to make command arguments. + * The option is used to change the C runtime library to `optlib` from `newlib`. + * RTT may not work with `newlib`. + */ + #include "../board.h" #include "iodefine.h" #include "interrupt_handlers.h" From 1d8a79ef4f4f6603ea8102b08613e97e18ed7eb6 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 31 Mar 2021 20:50:08 +0700 Subject: [PATCH 61/72] remove NVIC_SystemReset() in freertos examples --- examples/device/cdc_msc_freertos/src/main.c | 4 +--- examples/device/hid_composite_freertos/src/main.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/examples/device/cdc_msc_freertos/src/main.c b/examples/device/cdc_msc_freertos/src/main.c index abb95f4f..ccff2e0f 100644 --- a/examples/device/cdc_msc_freertos/src/main.c +++ b/examples/device/cdc_msc_freertos/src/main.c @@ -97,10 +97,8 @@ int main(void) // skip starting scheduler (and return) for ESP32-S2 #if CFG_TUSB_MCU != OPT_MCU_ESP32S2 vTaskStartScheduler(); -#if CFG_TUSB_MCU != OPT_MCU_RX63X - NVIC_SystemReset(); -#endif #endif + return 0; } diff --git a/examples/device/hid_composite_freertos/src/main.c b/examples/device/hid_composite_freertos/src/main.c index 1b42cee4..37b4a0cf 100644 --- a/examples/device/hid_composite_freertos/src/main.c +++ b/examples/device/hid_composite_freertos/src/main.c @@ -98,10 +98,8 @@ int main(void) // skip starting scheduler (and return) for ESP32-S2 #if CFG_TUSB_MCU != OPT_MCU_ESP32S2 vTaskStartScheduler(); -#if CFG_TUSB_MCU != OPT_MCU_RX63X - NVIC_SystemReset(); -#endif #endif + return 0; } From 65a04f02b6cae39e87c350ffe4894918050dfe8d Mon Sep 17 00:00:00 2001 From: Rafael Silva Date: Tue, 23 Mar 2021 21:40:53 +0000 Subject: [PATCH 62/72] add sltb009a bsp Signed-off-by: Rafael Silva --- hw/bsp/sltb009a/board.mk | 47 +++ hw/bsp/sltb009a/sltb009a.c | 721 +++++++++++++++++++++++++++++++++++++ 2 files changed, 768 insertions(+) create mode 100644 hw/bsp/sltb009a/board.mk create mode 100644 hw/bsp/sltb009a/sltb009a.c diff --git a/hw/bsp/sltb009a/board.mk b/hw/bsp/sltb009a/board.mk new file mode 100644 index 00000000..e8a24d1b --- /dev/null +++ b/hw/bsp/sltb009a/board.mk @@ -0,0 +1,47 @@ +CFLAGS += \ + -flto \ + -mthumb \ + -mcpu=cortex-m4 \ + -mfloat-abi=hard \ + -mfpu=fpv4-sp-d16 \ + -nostdlib -nostartfiles \ + -D__STARTUP_CLEAR_BSS \ + -D__START=main \ + -DEFM32GG12B810F1024GM64 \ + -DCFG_TUSB_MCU=OPT_MCU_EFM32GG12 + +# mcu driver cause following warnings +#CFLAGS += -Wno-error=unused-parameter + +SILABS_FAMILY = efm32gg12b +SILABS_CMSIS = hw/mcu/silabs/cmsis-dfp-$(SILABS_FAMILY)/Device/SiliconLabs/$(shell echo $(SILABS_FAMILY) | tr a-z A-Z) + +DEPS_SUBMODULES += hw/mcu/silabs/cmsis-dfp-$(SILABS_FAMILY) +DEPS_SUBMODULES += lib/CMSIS_5 + +# All source paths should be relative to the top level. +LD_FILE = $(SILABS_CMSIS)/Source/GCC/$(SILABS_FAMILY).ld + +SRC_C += \ + $(SILABS_CMSIS)/Source/system_$(SILABS_FAMILY).c \ + src/portable/silabs/efm32/dcd_efm32.c + +SRC_S += \ + $(SILABS_CMSIS)/Source/GCC/startup_$(SILABS_FAMILY).S + +INC += \ + $(TOP)/lib/CMSIS_5/CMSIS/Core/Include \ + $(TOP)/$(SILABS_CMSIS)/Include \ + $(TOP)/hw/bsp/$(BOARD) + +# For TinyUSB port source +VENDOR = silabs +CHIP_FAMILY = efm32 + +# For freeRTOS port source +FREERTOS_PORT = ARM_CM4 + +# For flash-jlink target +JLINK_DEVICE = EFM32GG12B810F1024 + +flash: flash-jlink diff --git a/hw/bsp/sltb009a/sltb009a.c b/hw/bsp/sltb009a/sltb009a.c new file mode 100644 index 00000000..b929adb1 --- /dev/null +++ b/hw/bsp/sltb009a/sltb009a.c @@ -0,0 +1,721 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2021 Rafael Silva (@perigoso) + * Copyright (c) 2021 Ha Thach (tinyusb.org) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * This file is part of the TinyUSB stack. + */ + +#include "../board.h" + +#include "em_device.h" + +/*--------------------------------------------------------------------*/ +/* MACRO TYPEDEF CONSTANT ENUM */ +/*--------------------------------------------------------------------*/ + +#define LED_PORT 0 // A +#define LED_PIN_R 12 // 12 +#define LED_PIN_B 13 // 13 +#define LED_PIN_G 14 // 14 +#define LED_STATE_ON 0 // active-low + +#define BUTTON_PORT 3 // D +#define BUTTON_PIN 5 // 5 +#define BUTTON_STATE_ACTIVE 0 // active-low + +/*--------------------------------------------------------------------*/ +/* Forward USB interrupt events to TinyUSB IRQ Handler */ +/*--------------------------------------------------------------------*/ + +void USB_IRQHandler(void) +{ + tud_int_handler(0); +} + +/*--------------------------------------------------------------------*/ +/* Fault Handlers */ +/*--------------------------------------------------------------------*/ + +void HardFault_Handler(void) +{ + asm("bkpt"); +} + +void MemManage_Handler(void) +{ + asm("bkpt"); +} + +void BusFault_Handler(void) +{ + asm("bkpt"); +} + +void UsageFault_Handler(void) +{ + asm("bkpt"); +} + +/*--------------------------------------------------------------------*/ +/* Startup */ +/*--------------------------------------------------------------------*/ + +// Required by __libc_init_array in startup code if we are compiling using +// -nostdlib/-nostartfiles. +void _init(void) +{ + +} + +/*--------------------------------------------------------------------*/ +/* Initing Funcs */ +/*--------------------------------------------------------------------*/ + +void emu_init(uint8_t immediate_switch) +{ + EMU->PWRCTRL = (immediate_switch ? EMU_PWRCTRL_IMMEDIATEPWRSWITCH : 0) | EMU_PWRCTRL_REGPWRSEL_DVDD | EMU_PWRCTRL_ANASW_AVDD; +} + +void emu_reg_init(float target_voltage) +{ + if(target_voltage < 2300.f || target_voltage >= 3800.f) + return; + + uint8_t level = ((target_voltage - 2300.f) / 100.f); + + EMU->R5VCTRL = EMU_R5VCTRL_INPUTMODE_AUTO; + + EMU->R5VOUTLEVEL = level; /* Reg output to 3.3V*/ +} + +void emu_dcdc_init(float target_voltage, float max_ln_current, float max_lp_current, float max_reverse_current) +{ + if(target_voltage < 1800.f || target_voltage >= 3000.f) + return; + + if(max_ln_current <= 0.f || max_ln_current > 200.f) + return; + + if(max_lp_current <= 0.f || max_lp_current > 10000.f) + return; + + if(max_reverse_current < 0.f || max_reverse_current > 160.f) + return; + + // Low Power & Low Noise current limit + uint8_t lp_bias = 0; + + if(max_lp_current < 75.f) + lp_bias = 0; + else if(max_lp_current < 500.f) + lp_bias = 1; + else if(max_lp_current < 2500.f) + lp_bias = 2; + else + lp_bias = 3; + + EMU->DCDCMISCCTRL = (EMU->DCDCMISCCTRL & ~_EMU_DCDCMISCCTRL_LPCMPBIASEM234H_MASK) | ((uint32_t)lp_bias << _EMU_DCDCMISCCTRL_LPCMPBIASEM234H_SHIFT); + EMU->DCDCMISCCTRL |= EMU_DCDCMISCCTRL_LNFORCECCM; // Force CCM to prevent reverse current + EMU->DCDCLPCTRL |= EMU_DCDCLPCTRL_LPVREFDUTYEN; // Enable duty cycling of the bias for LP mode + EMU->DCDCLNFREQCTRL = (EMU->DCDCLNFREQCTRL & ~_EMU_DCDCLNFREQCTRL_RCOBAND_MASK) | 4; // Set RCO Band to 7MHz + + uint8_t fet_count = 0; + + if(max_ln_current < 20.f) + fet_count = 4; + else if(max_ln_current >= 20.f && max_ln_current < 40.f) + fet_count = 8; + else + fet_count = 16; + + EMU->DCDCMISCCTRL = (EMU->DCDCMISCCTRL & ~_EMU_DCDCMISCCTRL_NFETCNT_MASK) | ((uint32_t)(fet_count - 1) << _EMU_DCDCMISCCTRL_NFETCNT_SHIFT); + EMU->DCDCMISCCTRL = (EMU->DCDCMISCCTRL & ~_EMU_DCDCMISCCTRL_PFETCNT_MASK) | ((uint32_t)(fet_count - 1) << _EMU_DCDCMISCCTRL_PFETCNT_SHIFT); + + uint8_t ln_current_limit = (((max_ln_current + 40.f) * 1.5f) / (5.f * fet_count)) - 1; + uint8_t lp_current_limit = 1; // Recommended value + + EMU->DCDCMISCCTRL = (EMU->DCDCMISCCTRL & ~(_EMU_DCDCMISCCTRL_LNCLIMILIMSEL_MASK | _EMU_DCDCMISCCTRL_LPCLIMILIMSEL_MASK)) | ((uint32_t)ln_current_limit << _EMU_DCDCMISCCTRL_LNCLIMILIMSEL_SHIFT) | ((uint32_t)lp_current_limit << _EMU_DCDCMISCCTRL_LPCLIMILIMSEL_SHIFT); + + uint8_t z_det_limit = ((max_reverse_current + 40.f) * 1.5f) / (2.5f * fet_count); + + EMU->DCDCZDETCTRL = (EMU->DCDCZDETCTRL & ~_EMU_DCDCZDETCTRL_ZDETILIMSEL_MASK) | ((uint32_t)z_det_limit << _EMU_DCDCZDETCTRL_ZDETILIMSEL_SHIFT); + + EMU->DCDCCLIMCTRL |= EMU_DCDCCLIMCTRL_BYPLIMEN; // Enable bypass current limiter to prevent overcurrent when switching modes + + // Output Voltage + if(target_voltage > 1800.f) + { + float max_vout = 3000.f; + float min_vout = 1800.f; + float diff_vout = max_vout - min_vout; + + uint8_t ln_vref_high = (DEVINFO->DCDCLNVCTRL0 & _DEVINFO_DCDCLNVCTRL0_3V0LNATT1_MASK) >> _DEVINFO_DCDCLNVCTRL0_3V0LNATT1_SHIFT; + uint8_t ln_vref_low = (DEVINFO->DCDCLNVCTRL0 & _DEVINFO_DCDCLNVCTRL0_1V8LNATT1_MASK) >> _DEVINFO_DCDCLNVCTRL0_1V8LNATT1_SHIFT; + + uint8_t ln_vref = ((target_voltage - min_vout) * (float)(ln_vref_high - ln_vref_low)) / diff_vout; + ln_vref += ln_vref_low; + + EMU->DCDCLNVCTRL = (ln_vref << _EMU_DCDCLNVCTRL_LNVREF_SHIFT) | EMU_DCDCLNVCTRL_LNATT; + + uint8_t lp_vref_low = 0; + uint8_t lp_vref_high = 0; + + switch(lp_bias) + { + case 0: + { + lp_vref_high = (DEVINFO->DCDCLPVCTRL2 & _DEVINFO_DCDCLPVCTRL2_3V0LPATT1LPCMPBIAS0_MASK) >> _DEVINFO_DCDCLPVCTRL2_3V0LPATT1LPCMPBIAS0_SHIFT; + lp_vref_low = (DEVINFO->DCDCLPVCTRL2 & _DEVINFO_DCDCLPVCTRL2_1V8LPATT1LPCMPBIAS0_MASK) >> _DEVINFO_DCDCLPVCTRL2_1V8LPATT1LPCMPBIAS0_SHIFT; + } + break; + case 1: + { + lp_vref_high = (DEVINFO->DCDCLPVCTRL2 & _DEVINFO_DCDCLPVCTRL2_3V0LPATT1LPCMPBIAS1_MASK) >> _DEVINFO_DCDCLPVCTRL2_3V0LPATT1LPCMPBIAS1_SHIFT; + lp_vref_low = (DEVINFO->DCDCLPVCTRL2 & _DEVINFO_DCDCLPVCTRL2_1V8LPATT1LPCMPBIAS1_MASK) >> _DEVINFO_DCDCLPVCTRL2_1V8LPATT1LPCMPBIAS1_SHIFT; + } + break; + case 2: + { + lp_vref_high = (DEVINFO->DCDCLPVCTRL3 & _DEVINFO_DCDCLPVCTRL3_3V0LPATT1LPCMPBIAS2_MASK) >> _DEVINFO_DCDCLPVCTRL3_3V0LPATT1LPCMPBIAS2_SHIFT; + lp_vref_low = (DEVINFO->DCDCLPVCTRL3 & _DEVINFO_DCDCLPVCTRL3_1V8LPATT1LPCMPBIAS2_MASK) >> _DEVINFO_DCDCLPVCTRL3_1V8LPATT1LPCMPBIAS2_SHIFT; + } + break; + case 3: + { + lp_vref_high = (DEVINFO->DCDCLPVCTRL3 & _DEVINFO_DCDCLPVCTRL3_3V0LPATT1LPCMPBIAS3_MASK) >> _DEVINFO_DCDCLPVCTRL3_3V0LPATT1LPCMPBIAS3_SHIFT; + lp_vref_low = (DEVINFO->DCDCLPVCTRL3 & _DEVINFO_DCDCLPVCTRL3_1V8LPATT1LPCMPBIAS3_MASK) >> _DEVINFO_DCDCLPVCTRL3_1V8LPATT1LPCMPBIAS3_SHIFT; + } + break; + } + + uint8_t lp_vref = ((target_voltage - min_vout) * (float)(lp_vref_high - lp_vref_low)) / diff_vout; + lp_vref += lp_vref_low; + + EMU->DCDCLPVCTRL = (lp_vref << _EMU_DCDCLPVCTRL_LPVREF_SHIFT) | EMU_DCDCLPVCTRL_LPATT; + } + else + { + float max_vout = 1800.f; + float min_vout = 1200.f; + float diff_vout = max_vout - min_vout; + + uint8_t ln_vref_high = (DEVINFO->DCDCLNVCTRL0 & _DEVINFO_DCDCLNVCTRL0_1V8LNATT0_MASK) >> _DEVINFO_DCDCLNVCTRL0_1V8LNATT0_SHIFT; + uint8_t ln_vref_low = (DEVINFO->DCDCLNVCTRL0 & _DEVINFO_DCDCLNVCTRL0_1V2LNATT0_MASK) >> _DEVINFO_DCDCLNVCTRL0_1V2LNATT0_SHIFT; + + uint8_t ln_vref = ((target_voltage - min_vout) * (float)(ln_vref_high - ln_vref_low)) / diff_vout; + ln_vref += ln_vref_low; + + EMU->DCDCLNVCTRL = ln_vref << _EMU_DCDCLNVCTRL_LNVREF_SHIFT; + + uint8_t lp_vref_low = 0; + uint8_t lp_vref_high = 0; + + switch(lp_bias) + { + case 0: + { + lp_vref_high = (DEVINFO->DCDCLPVCTRL0 & _DEVINFO_DCDCLPVCTRL2_3V0LPATT1LPCMPBIAS0_MASK) >> _DEVINFO_DCDCLPVCTRL2_3V0LPATT1LPCMPBIAS0_SHIFT; + lp_vref_low = (DEVINFO->DCDCLPVCTRL0 & _DEVINFO_DCDCLPVCTRL2_1V8LPATT1LPCMPBIAS0_MASK) >> _DEVINFO_DCDCLPVCTRL2_1V8LPATT1LPCMPBIAS0_SHIFT; + } + break; + case 1: + { + lp_vref_high = (DEVINFO->DCDCLPVCTRL0 & _DEVINFO_DCDCLPVCTRL2_3V0LPATT1LPCMPBIAS1_MASK) >> _DEVINFO_DCDCLPVCTRL2_3V0LPATT1LPCMPBIAS1_SHIFT; + lp_vref_low = (DEVINFO->DCDCLPVCTRL0 & _DEVINFO_DCDCLPVCTRL2_1V8LPATT1LPCMPBIAS1_MASK) >> _DEVINFO_DCDCLPVCTRL2_1V8LPATT1LPCMPBIAS1_SHIFT; + } + break; + case 2: + { + lp_vref_high = (DEVINFO->DCDCLPVCTRL1 & _DEVINFO_DCDCLPVCTRL3_3V0LPATT1LPCMPBIAS2_MASK) >> _DEVINFO_DCDCLPVCTRL3_3V0LPATT1LPCMPBIAS2_SHIFT; + lp_vref_low = (DEVINFO->DCDCLPVCTRL1 & _DEVINFO_DCDCLPVCTRL3_1V8LPATT1LPCMPBIAS2_MASK) >> _DEVINFO_DCDCLPVCTRL3_1V8LPATT1LPCMPBIAS2_SHIFT; + } + break; + case 3: + { + lp_vref_high = (DEVINFO->DCDCLPVCTRL1 & _DEVINFO_DCDCLPVCTRL3_3V0LPATT1LPCMPBIAS3_MASK) >> _DEVINFO_DCDCLPVCTRL3_3V0LPATT1LPCMPBIAS3_SHIFT; + lp_vref_low = (DEVINFO->DCDCLPVCTRL1 & _DEVINFO_DCDCLPVCTRL3_1V8LPATT1LPCMPBIAS3_MASK) >> _DEVINFO_DCDCLPVCTRL3_1V8LPATT1LPCMPBIAS3_SHIFT; + } + break; + } + + uint8_t lp_vref = ((target_voltage - min_vout) * (float)(lp_vref_high - lp_vref_low)) / diff_vout; + lp_vref += lp_vref_low; + + EMU->DCDCLPVCTRL = lp_vref << _EMU_DCDCLPVCTRL_LPVREF_SHIFT; + } + + EMU->DCDCLPCTRL = (EMU->DCDCLPCTRL & ~_EMU_DCDCLPCTRL_LPCMPHYSSELEM234H_MASK) | (((DEVINFO->DCDCLPCMPHYSSEL1 & (((uint32_t)0xFF) << (lp_bias * 8))) >> (lp_bias * 8)) << _EMU_DCDCLPCTRL_LPCMPHYSSELEM234H_SHIFT); + + while(EMU->DCDCSYNC & EMU_DCDCSYNC_DCDCCTRLBUSY); // Wait for configuration to write + + // Calibration + //EMU->DCDCLNCOMPCTRL = 0x57204077; // Compensation for 1uF DCDC capacitor + EMU->DCDCLNCOMPCTRL = 0xB7102137; // Compensation for 4.7uF DCDC capacitor + + // Enable DCDC converter + EMU->DCDCCTRL = EMU_DCDCCTRL_DCDCMODEEM4_EM4LOWPOWER | EMU_DCDCCTRL_DCDCMODEEM23_EM23LOWPOWER | EMU_DCDCCTRL_DCDCMODE_LOWNOISE; + + // Switch digital domain to DVDD + EMU->PWRCTRL = EMU_PWRCTRL_REGPWRSEL_DVDD | EMU_PWRCTRL_ANASW_AVDD; +} + +void cmu_hfxo_startup_calib(uint16_t ib_trim, uint16_t c_tune) +{ + if(CMU->STATUS & CMU_STATUS_HFXOENS) + return; + + CMU->HFXOSTARTUPCTRL = (CMU->HFXOSTARTUPCTRL & ~(_CMU_HFXOSTARTUPCTRL_CTUNE_MASK | _CMU_HFXOSTARTUPCTRL_IBTRIMXOCORE_MASK)) | (((uint32_t)c_tune << _CMU_HFXOSTARTUPCTRL_CTUNE_SHIFT) & _CMU_HFXOSTARTUPCTRL_CTUNE_MASK) | (((uint32_t)ib_trim << _CMU_HFXOSTARTUPCTRL_IBTRIMXOCORE_SHIFT) & _CMU_HFXOSTARTUPCTRL_IBTRIMXOCORE_MASK); +} + +void cmu_hfxo_steady_calib(uint16_t ib_trim, uint16_t c_tune) +{ + if(CMU->STATUS & CMU_STATUS_HFXOENS) + return; + + CMU->HFXOSTEADYSTATECTRL = (CMU->HFXOSTEADYSTATECTRL & ~(_CMU_HFXOSTEADYSTATECTRL_CTUNE_MASK | _CMU_HFXOSTEADYSTATECTRL_IBTRIMXOCORE_MASK)) | (((uint32_t)c_tune << _CMU_HFXOSTEADYSTATECTRL_CTUNE_SHIFT) & _CMU_HFXOSTEADYSTATECTRL_CTUNE_MASK) | (((uint32_t)ib_trim << _CMU_HFXOSTEADYSTATECTRL_IBTRIMXOCORE_SHIFT) & _CMU_HFXOSTEADYSTATECTRL_IBTRIMXOCORE_MASK); +} + +void cmu_hfrco_calib(uint32_t calibration) +{ + if(CMU->STATUS & CMU_STATUS_DPLLENS) + return; + + while(CMU->SYNCBUSY & CMU_SYNCBUSY_HFRCOBSY); + + CMU->HFRCOCTRL = calibration; + + while(CMU->SYNCBUSY & CMU_SYNCBUSY_HFRCOBSY); +} + +void cmu_ushfrco_calib(uint8_t enable, uint32_t calibration) +{ + if(CMU->USBCRCTRL & CMU_USBCRCTRL_USBCREN) + return; + + if(!enable) + { + CMU->OSCENCMD = CMU_OSCENCMD_USHFRCODIS; + while(CMU->STATUS & CMU_STATUS_USHFRCOENS); + + return; + } + + while(CMU->SYNCBUSY & CMU_SYNCBUSY_USHFRCOBSY); + + CMU->USHFRCOCTRL = calibration | CMU_USHFRCOCTRL_FINETUNINGEN; + + while(CMU->SYNCBUSY & CMU_SYNCBUSY_USHFRCOBSY); + + if(enable && !(CMU->STATUS & CMU_STATUS_USHFRCOENS)) + { + CMU->OSCENCMD = CMU_OSCENCMD_USHFRCOEN; + + while(!(CMU->STATUS & CMU_STATUS_USHFRCORDY)); + } +} + +void cmu_auxhfrco_calib(uint8_t enable, uint32_t calibration) +{ + if(!enable) + { + CMU->OSCENCMD = CMU_OSCENCMD_AUXHFRCODIS; + while(CMU->STATUS & CMU_STATUS_AUXHFRCOENS); + + return; + } + + while(CMU->SYNCBUSY & CMU_SYNCBUSY_AUXHFRCOBSY); + + CMU->AUXHFRCOCTRL = calibration; + + while(CMU->SYNCBUSY & CMU_SYNCBUSY_AUXHFRCOBSY); + + if(enable && !(CMU->STATUS & CMU_STATUS_AUXHFRCOENS)) + { + CMU->OSCENCMD = CMU_OSCENCMD_AUXHFRCOEN; + + while(!(CMU->STATUS & CMU_STATUS_AUXHFRCORDY)); + } +} + + +void cmu_init(void) +{ + // Change SDIO clock to HFXO if HFRCO selected and disable it + CMU->SDIOCTRL = CMU_SDIOCTRL_SDIOCLKDIS | CMU_SDIOCTRL_SDIOCLKSEL_HFXO; + while(CMU->STATUS & CMU_STATUS_SDIOCLKENS); + + // Change QSPI clock to HFXO if HFRCO selected and disable it + CMU->QSPICTRL = CMU_QSPICTRL_QSPI0CLKDIS | CMU_QSPICTRL_QSPI0CLKSEL_HFXO; + while(CMU->STATUS & CMU_STATUS_QSPI0CLKENS); + + // Disable DPLL if enabled + if(CMU->STATUS & CMU_STATUS_DPLLENS) + { + CMU->OSCENCMD = CMU_OSCENCMD_DPLLDIS; + while(CMU->STATUS & CMU_STATUS_DPLLENS); + } + + // Disable HFXO if enabled + if(CMU->STATUS & CMU_STATUS_HFXOENS) + { + CMU->OSCENCMD = CMU_OSCENCMD_HFXODIS; + while(CMU->STATUS & CMU_STATUS_HFXOENS); + } + + // Setup HFXO + CMU->HFXOCTRL = CMU_HFXOCTRL_PEAKDETMODE_AUTOCMD | CMU_HFXOCTRL_MODE_XTAL; + CMU->HFXOCTRL1 = CMU_HFXOCTRL1_PEAKDETTHR_DEFAULT; + CMU->HFXOSTEADYSTATECTRL |= CMU_HFXOSTEADYSTATECTRL_PEAKMONEN; + CMU->HFXOTIMEOUTCTRL = (7 << _CMU_HFXOTIMEOUTCTRL_PEAKDETTIMEOUT_SHIFT) | (8 << _CMU_HFXOTIMEOUTCTRL_STEADYTIMEOUT_SHIFT) | (12 << _CMU_HFXOTIMEOUTCTRL_STARTUPTIMEOUT_SHIFT); + + // Enable HFXO and wait for it to be ready + CMU->OSCENCMD = CMU_OSCENCMD_HFXOEN; + while(!(CMU->STATUS & CMU_STATUS_HFXORDY)); + + // Switch main clock to HFXO and wait for it to be selected + CMU->HFCLKSEL = CMU_HFCLKSEL_HF_HFXO; + while((CMU->HFCLKSTATUS & _CMU_HFCLKSTATUS_SELECTED_MASK) != CMU_HFCLKSTATUS_SELECTED_HFXO); + + // Calibrate HFRCO for 72MHz and enable tunning by PLL + cmu_hfrco_calib((DEVINFO->HFRCOCAL16) | CMU_HFRCOCTRL_FINETUNINGEN); + + // Setup the PLL + CMU->DPLLCTRL = CMU_DPLLCTRL_REFSEL_HFXO | CMU_DPLLCTRL_AUTORECOVER | CMU_DPLLCTRL_EDGESEL_RISE | CMU_DPLLCTRL_MODE_FREQLL; + // 72MHz = 50MHz (HFXO) * 1.44 (144/100) + CMU->DPLLCTRL1 = (143 << _CMU_DPLLCTRL1_N_SHIFT) | (99 << _CMU_DPLLCTRL1_M_SHIFT); // fHFRCO = fHFXO * (N + 1) / (M + 1) + + // Enable the DPLL and wait for it to be ready + CMU->OSCENCMD = CMU_OSCENCMD_DPLLEN; + while(!(CMU->STATUS & CMU_STATUS_DPLLRDY)); + + // Config peripherals for the new frequency (freq > 32MHz) + CMU->CTRL |= CMU_CTRL_WSHFLE; + + // Set prescalers + CMU->HFPRESC = CMU_HFPRESC_HFCLKLEPRESC_DIV2 | CMU_HFPRESC_PRESC_NODIVISION; + CMU->HFBUSPRESC = 1 << _CMU_HFBUSPRESC_PRESC_SHIFT; + CMU->HFCOREPRESC = 0 << _CMU_HFCOREPRESC_PRESC_SHIFT; + CMU->HFPERPRESC = 1 << _CMU_HFPERPRESC_PRESC_SHIFT; + CMU->HFEXPPRESC = 0 << _CMU_HFEXPPRESC_PRESC_SHIFT; + CMU->HFPERPRESCB = 0 << _CMU_HFPERPRESCB_PRESC_SHIFT; + CMU->HFPERPRESCC = 1 << _CMU_HFPERPRESCC_PRESC_SHIFT; + + // Enable clock to peripherals + CMU->CTRL |= CMU_CTRL_HFPERCLKEN; + + // Switch main clock to HFRCO and wait for it to be selected + CMU->HFCLKSEL = CMU_HFCLKSEL_HF_HFRCO; + while((CMU->HFCLKSTATUS & _CMU_HFCLKSTATUS_SELECTED_MASK) != CMU_HFCLKSTATUS_SELECTED_HFRCO); + + // LFA Clock + CMU->LFACLKSEL = CMU_LFACLKSEL_LFA_LFRCO; + + // LFB Clock + CMU->LFBCLKSEL = CMU_LFBCLKSEL_LFB_LFRCO; + + // LFC Clock + CMU->LFCCLKSEL = CMU_LFCCLKSEL_LFC_LFRCO; + + // LFE Clock + CMU->LFECLKSEL = CMU_LFECLKSEL_LFE_ULFRCO; +} + +void systick_init(void) +{ + SysTick->LOAD = (72000000 / 1000) - 1; + SysTick->VAL = 0; + SysTick->CTRL = SysTick_CTRL_TICKINT_Msk | SysTick_CTRL_ENABLE_Msk | SysTick_CTRL_CLKSOURCE_Msk; + + SCB->SHP[11] = 7 << (8 - __NVIC_PRIO_BITS); // Set priority 3,1 (min) +} + +void gpio_init(void) +{ + CMU->HFBUSCLKEN0 |= CMU_HFBUSCLKEN0_GPIO; + + // NC - Not Connected (not available in mcu package) + // NR - Not routed (no routing to pin on pcb, floating) + // NU - Not used (not currently in use) + + // Port A + GPIO->P[0].CTRL = GPIO_P_CTRL_DRIVESTRENGTHALT_STRONG | (6 << _GPIO_P_CTRL_SLEWRATEALT_SHIFT) + | GPIO_P_CTRL_DRIVESTRENGTH_STRONG | (6 << _GPIO_P_CTRL_SLEWRATE_SHIFT); + GPIO->P[0].MODEL = GPIO_P_MODEL_MODE0_DISABLED // NU + | GPIO_P_MODEL_MODE1_DISABLED // NU + | GPIO_P_MODEL_MODE2_DISABLED // NU + | GPIO_P_MODEL_MODE3_DISABLED // NU + | GPIO_P_MODEL_MODE4_DISABLED // NU + | GPIO_P_MODEL_MODE5_DISABLED // NU + | GPIO_P_MODEL_MODE6_DISABLED // NU + | GPIO_P_MODEL_MODE7_DISABLED; // NC + GPIO->P[0].MODEH = GPIO_P_MODEH_MODE8_DISABLED // GPIO - MIC_ENABLE + | GPIO_P_MODEH_MODE9_DISABLED // NC + | GPIO_P_MODEH_MODE10_DISABLED // NC + | GPIO_P_MODEH_MODE11_DISABLED // NC + | GPIO_P_MODEH_MODE12_WIREDAND // LED0R + | GPIO_P_MODEH_MODE13_WIREDAND // LED0B + | GPIO_P_MODEH_MODE14_WIREDAND // LED0G + | GPIO_P_MODEH_MODE15_DISABLED; // NU + GPIO->P[0].DOUT = 0x7000; // Leds off By default + GPIO->P[0].OVTDIS = 0; + + // Port B + GPIO->P[1].CTRL = GPIO_P_CTRL_DRIVESTRENGTHALT_STRONG | (6 << _GPIO_P_CTRL_SLEWRATEALT_SHIFT) + | GPIO_P_CTRL_DRIVESTRENGTH_STRONG | (6 << _GPIO_P_CTRL_SLEWRATE_SHIFT); + GPIO->P[1].MODEL = GPIO_P_MODEL_MODE0_DISABLED // NC + | GPIO_P_MODEL_MODE1_DISABLED // NC + | GPIO_P_MODEL_MODE2_DISABLED // NC + | GPIO_P_MODEL_MODE3_DISABLED // NU + | GPIO_P_MODEL_MODE4_DISABLED // NU + | GPIO_P_MODEL_MODE5_DISABLED // NU + | GPIO_P_MODEL_MODE6_DISABLED // NU + | GPIO_P_MODEL_MODE7_DISABLED; // MAIN_LFXTAL_P + GPIO->P[1].MODEH = GPIO_P_MODEH_MODE8_DISABLED // MAIN_LFXTAL_N + | GPIO_P_MODEH_MODE9_DISABLED // NC + | GPIO_P_MODEH_MODE10_DISABLED // NC + | GPIO_P_MODEH_MODE11_DISABLED // PDM_DAT0 - MIC_DATA + | GPIO_P_MODEH_MODE12_DISABLED // PDM_CLK - MIC_CLOCK + | GPIO_P_MODEH_MODE13_DISABLED // MAIN_HFXTAL_P + | GPIO_P_MODEH_MODE14_DISABLED // MAIN_HFXTAL_N + | GPIO_P_MODEH_MODE15_DISABLED; // NC + GPIO->P[1].DOUT = 0; + GPIO->P[1].OVTDIS = 0; + + // Port C + GPIO->P[2].CTRL = GPIO_P_CTRL_DRIVESTRENGTHALT_STRONG | (6 << _GPIO_P_CTRL_SLEWRATEALT_SHIFT) + | GPIO_P_CTRL_DRIVESTRENGTH_STRONG | (7 << _GPIO_P_CTRL_SLEWRATE_SHIFT); + GPIO->P[2].MODEL = GPIO_P_MODEL_MODE0_DISABLED // NC + | GPIO_P_MODEL_MODE1_DISABLED // NC + | GPIO_P_MODEL_MODE2_DISABLED // NC + | GPIO_P_MODEL_MODE3_DISABLED // NC + | GPIO_P_MODEL_MODE4_DISABLED // NU + | GPIO_P_MODEL_MODE5_DISABLED // NU + | GPIO_P_MODEL_MODE6_DISABLED // NC + | GPIO_P_MODEL_MODE7_DISABLED; // NC + GPIO->P[2].MODEH = GPIO_P_MODEH_MODE8_DISABLED // NC + | GPIO_P_MODEH_MODE9_DISABLED // NC + | GPIO_P_MODEH_MODE10_DISABLED // NC + | GPIO_P_MODEH_MODE11_DISABLED // NC + | GPIO_P_MODEH_MODE12_DISABLED // NC + | GPIO_P_MODEH_MODE13_DISABLED // NC + | GPIO_P_MODEH_MODE14_DISABLED // NC + | GPIO_P_MODEH_MODE15_DISABLED; // NC + GPIO->P[2].DOUT = 0; + GPIO->P[2].OVTDIS = 0; + + // Port D + GPIO->P[3].CTRL = GPIO_P_CTRL_DRIVESTRENGTHALT_STRONG | (6 << _GPIO_P_CTRL_SLEWRATEALT_SHIFT) + | GPIO_P_CTRL_DRIVESTRENGTH_STRONG | (6 << _GPIO_P_CTRL_SLEWRATE_SHIFT); + GPIO->P[3].MODEL = GPIO_P_MODEL_MODE0_DISABLED // NU + | GPIO_P_MODEL_MODE1_DISABLED // NU + | GPIO_P_MODEL_MODE2_DISABLED // NU + | GPIO_P_MODEL_MODE3_DISABLED // NU + | GPIO_P_MODEL_MODE4_DISABLED // NU + | GPIO_P_MODEL_MODE5_INPUT // GPIO - BTN0 + | GPIO_P_MODEL_MODE6_WIREDAND // LED1R + | GPIO_P_MODEL_MODE7_DISABLED; // NU + GPIO->P[3].MODEH = GPIO_P_MODEH_MODE8_INPUT // GPIO - BTN1 + | GPIO_P_MODEH_MODE9_DISABLED // NC + | GPIO_P_MODEH_MODE10_DISABLED // NC + | GPIO_P_MODEH_MODE11_DISABLED // NC + | GPIO_P_MODEH_MODE12_DISABLED // NC + | GPIO_P_MODEH_MODE13_DISABLED // NC + | GPIO_P_MODEH_MODE14_DISABLED // NC + | GPIO_P_MODEH_MODE15_DISABLED; // NC + GPIO->P[3].DOUT = 0; + GPIO->P[3].OVTDIS = 0; + + // Port E + GPIO->P[4].CTRL = GPIO_P_CTRL_DRIVESTRENGTHALT_STRONG | (6 << _GPIO_P_CTRL_SLEWRATEALT_SHIFT) + | GPIO_P_CTRL_DRIVESTRENGTH_STRONG | (6 << _GPIO_P_CTRL_SLEWRATE_SHIFT); + GPIO->P[4].MODEL = GPIO_P_MODEL_MODE0_DISABLED // NC + | GPIO_P_MODEL_MODE1_DISABLED // NC + | GPIO_P_MODEL_MODE2_DISABLED // NC + | GPIO_P_MODEL_MODE3_DISABLED // NC + | GPIO_P_MODEL_MODE4_DISABLED // NU + | GPIO_P_MODEL_MODE5_DISABLED // NU + | GPIO_P_MODEL_MODE6_DISABLED // NU + | GPIO_P_MODEL_MODE7_DISABLED; // NU + GPIO->P[4].MODEH = GPIO_P_MODEH_MODE8_DISABLED // NU + | GPIO_P_MODEH_MODE9_DISABLED // NU + | GPIO_P_MODEH_MODE10_DISABLED // NU + | GPIO_P_MODEH_MODE11_DISABLED // NU + | GPIO_P_MODEH_MODE12_WIREDAND // LED1B + | GPIO_P_MODEH_MODE13_DISABLED // NU + | GPIO_P_MODEH_MODE14_DISABLED // NU + | GPIO_P_MODEH_MODE15_DISABLED; // NU + GPIO->P[4].DOUT = 0; + GPIO->P[4].OVTDIS = 0; + + // Port F + GPIO->P[5].CTRL = GPIO_P_CTRL_DRIVESTRENGTHALT_STRONG | (6 << _GPIO_P_CTRL_SLEWRATEALT_SHIFT) + | GPIO_P_CTRL_DRIVESTRENGTH_STRONG | (6 << _GPIO_P_CTRL_SLEWRATE_SHIFT); + GPIO->P[5].MODEL = GPIO_P_MODEL_MODE0_PUSHPULL // SWCLK + | GPIO_P_MODEL_MODE1_PUSHPULL // SWDIO + | GPIO_P_MODEL_MODE2_PUSHPULL // SWO + | GPIO_P_MODEL_MODE3_DISABLED // NC + | GPIO_P_MODEL_MODE4_DISABLED // NC + | GPIO_P_MODEL_MODE5_DISABLED // NU + | GPIO_P_MODEL_MODE6_DISABLED // NC + | GPIO_P_MODEL_MODE7_DISABLED; // NC + GPIO->P[5].MODEH = GPIO_P_MODEH_MODE8_DISABLED // NC + | GPIO_P_MODEH_MODE9_DISABLED // NC + | GPIO_P_MODEH_MODE10_DISABLED // USB N + | GPIO_P_MODEH_MODE11_DISABLED // USB P + | GPIO_P_MODEH_MODE12_WIREDAND // LED1G + | GPIO_P_MODEH_MODE13_DISABLED // NC + | GPIO_P_MODEH_MODE14_DISABLED // NC + | GPIO_P_MODEH_MODE15_DISABLED; // NC + GPIO->P[5].DOUT = 0; + + GPIO->P[5].OVTDIS = 0; + + // Debugger Route + GPIO->ROUTEPEN &= ~(GPIO_ROUTEPEN_TDIPEN | GPIO_ROUTEPEN_TDOPEN); // Disable JTAG + GPIO->ROUTEPEN |= GPIO_ROUTEPEN_SWVPEN; // Enable SWO + GPIO->ROUTELOC0 = GPIO_ROUTELOC0_SWVLOC_LOC0; // SWO on PF2 + + // External interrupts + GPIO->EXTIPSELL = GPIO_EXTIPSELL_EXTIPSEL0_PORTE // NU + | GPIO_EXTIPSELL_EXTIPSEL1_PORTB // NU + | GPIO_EXTIPSELL_EXTIPSEL2_PORTB // NU + | GPIO_EXTIPSELL_EXTIPSEL3_PORTB // NU + | GPIO_EXTIPSELL_EXTIPSEL4_PORTA // NU + | GPIO_EXTIPSELL_EXTIPSEL5_PORTA // NU + | GPIO_EXTIPSELL_EXTIPSEL6_PORTC // NU + | GPIO_EXTIPSELL_EXTIPSEL7_PORTC; // NU + GPIO->EXTIPSELH = GPIO_EXTIPSELH_EXTIPSEL8_PORTA // NU + | GPIO_EXTIPSELH_EXTIPSEL9_PORTE // NU + | GPIO_EXTIPSELH_EXTIPSEL10_PORTF // NU + | GPIO_EXTIPSELH_EXTIPSEL11_PORTA // NU + | GPIO_EXTIPSELH_EXTIPSEL12_PORTA // NU + | GPIO_EXTIPSELH_EXTIPSEL13_PORTE // NU + | GPIO_EXTIPSELH_EXTIPSEL14_PORTF // NU + | GPIO_EXTIPSELH_EXTIPSEL15_PORTA; // NU + + GPIO->EXTIPINSELL = GPIO_EXTIPINSELL_EXTIPINSEL0_PIN3 // NU + | GPIO_EXTIPINSELL_EXTIPINSEL1_PIN1 // NU + | GPIO_EXTIPINSELL_EXTIPINSEL2_PIN2 // NU + | GPIO_EXTIPINSELL_EXTIPINSEL3_PIN3 // NU + | GPIO_EXTIPINSELL_EXTIPINSEL4_PIN6 // NU + | GPIO_EXTIPINSELL_EXTIPINSEL5_PIN7 // NU + | GPIO_EXTIPINSELL_EXTIPINSEL6_PIN4 // NU + | GPIO_EXTIPINSELL_EXTIPINSEL7_PIN7; // NU + GPIO->EXTIPINSELH = GPIO_EXTIPINSELH_EXTIPINSEL8_PIN8 // NU + | GPIO_EXTIPINSELH_EXTIPINSEL9_PIN9 // NU + | GPIO_EXTIPINSELH_EXTIPINSEL10_PIN11 // NU + | GPIO_EXTIPINSELH_EXTIPINSEL11_PIN8 // NU + | GPIO_EXTIPINSELH_EXTIPINSEL12_PIN13 // NU + | GPIO_EXTIPINSELH_EXTIPINSEL13_PIN15 // NU + | GPIO_EXTIPINSELH_EXTIPINSEL14_PIN12 // NU + | GPIO_EXTIPINSELH_EXTIPINSEL15_PIN12; // NU + +} + +/*--------------------------------------------------------------------*/ +/* Board Init */ +/*--------------------------------------------------------------------*/ + +void board_init(void) +{ + + emu_dcdc_init(1800.f, 50.f, 100.f, 0.f); // Init DC-DC converter (1.8 V, 50 mA active, 100 uA sleep, 0 mA reverse limit) + emu_init(0); + emu_reg_init(3300.f); // set output regulator to 3.3V + + cmu_hfxo_startup_calib(0x200, 0x145); // Config HFXO Startup for 1280 uA, 36 pF (18 pF + 2 pF CLOAD) + cmu_hfxo_steady_calib(0x009, 0x145); // Config HFXO Steady for 12 uA, 36 pF (18 pF + 2 pF CLOAD) + + cmu_init(); // Init Clock Management Unit + + cmu_ushfrco_calib(1, DEVINFO->USHFRCOCAL13); // Enable and calibrate USHFRCO for 48 MHz + cmu_auxhfrco_calib(1, DEVINFO->AUXHFRCOCAL11); // Enable and calibrate AUXHFRCO for 32 MHz + + CMU->USBCRCTRL = CMU_USBCRCTRL_USBCREN; // enable USB clock recovery + CMU->USBCTRL = CMU_USBCTRL_USBCLKSEL_USHFRCO | CMU_USBCTRL_USBCLKEN; // select USHFRCO as USB Phy clock source and enable it + + CMU->HFBUSCLKEN0 |= CMU_HFBUSCLKEN0_USB; // enable USB peripheral clock + + systick_init(); // Init system tick + + gpio_init(); // Init IOs + +} + +/*--------------------------------------------------------------------*/ +/* Board porting API */ +/*--------------------------------------------------------------------*/ + +void board_led_write(bool state) +{ + // Combine red and blue for pink Because it looks good :) + GPIO->P[LED_PORT].DOUT = (GPIO->P[LED_PORT].DOUT & ~((1 << LED_PIN_R) | (1 << LED_PIN_B))) | (state << LED_PIN_R) | (state << LED_PIN_B); +} + +uint32_t board_button_read(void) +{ + return !!(GPIO->P[BUTTON_PORT].DIN & (1 << BUTTON_PIN)); +} + +int board_uart_read(uint8_t* buf, int len) +{ + (void) buf; (void) len; + return 0; +} + +int board_uart_write(void const * buf, int len) +{ + (void) buf; (void) len; + return 0; +} + +#if CFG_TUSB_OS == OPT_OS_NONE +volatile uint32_t system_ticks = 0; +void SysTick_Handler(void) +{ + system_ticks++; +} + +uint32_t board_millis(void) +{ + return system_ticks; +} +#endif + +#ifdef USE_FULL_ASSERT +/** + * @brief Reports the name of the source file and the source line number + * where the assert_param error has occurred. + * @param file: pointer to the source file name + * @param line: assert_param error line source number + * @retval None + */ +void assert_failed(char *file, uint32_t line) +{ + /* USER CODE BEGIN 6 */ + /* User can add his own implementation to report the file name and line number, + tex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ + /* USER CODE END 6 */ +} +#endif /* USE_FULL_ASSERT */ From 735e0dff20e89387f07875aa945636abe094528b Mon Sep 17 00:00:00 2001 From: Rafael Silva Date: Wed, 31 Mar 2021 22:37:15 +0100 Subject: [PATCH 63/72] skip freertos example for efm32gg12 Signed-off-by: Rafael Silva --- examples/device/cdc_msc_freertos/.skip.MCU_EFM32GG12 | 0 examples/device/hid_composite_freertos/.skip.MCU_EFM32GG12 | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 examples/device/cdc_msc_freertos/.skip.MCU_EFM32GG12 create mode 100644 examples/device/hid_composite_freertos/.skip.MCU_EFM32GG12 diff --git a/examples/device/cdc_msc_freertos/.skip.MCU_EFM32GG12 b/examples/device/cdc_msc_freertos/.skip.MCU_EFM32GG12 new file mode 100644 index 00000000..e69de29b diff --git a/examples/device/hid_composite_freertos/.skip.MCU_EFM32GG12 b/examples/device/hid_composite_freertos/.skip.MCU_EFM32GG12 new file mode 100644 index 00000000..e69de29b From 080b14b292251e46b43aac9e1cf7807dc2d3eb2c Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 2 Apr 2021 13:26:55 +0700 Subject: [PATCH 64/72] fix midi tx fifo overflow cause data corruption rename --- .../device/dynamic_configuration/src/main.c | 2 +- examples/device/midi_test/src/main.c | 8 +- examples/make.mk | 2 +- src/class/midi/midi.h | 45 ++++++++ src/class/midi/midi_device.c | 103 +++++++++++------- src/class/midi/midi_device.h | 16 ++- 6 files changed, 127 insertions(+), 49 deletions(-) diff --git a/examples/device/dynamic_configuration/src/main.c b/examples/device/dynamic_configuration/src/main.c index acee295f..ce1f752d 100644 --- a/examples/device/dynamic_configuration/src/main.c +++ b/examples/device/dynamic_configuration/src/main.c @@ -172,7 +172,7 @@ void midi_task(void) // regardless of these being used or not. Therefore incoming traffic should be read // (possibly just discarded) to avoid the sender blocking in IO uint8_t packet[4]; - while(tud_midi_available()) tud_midi_receive(packet); + while( tud_midi_available() ) tud_midi_packet_read(packet); // send note every 1000 ms if (board_millis() - start_ms < 286) return; // not enough time diff --git a/examples/device/midi_test/src/main.c b/examples/device/midi_test/src/main.c index 858a096b..af10350d 100644 --- a/examples/device/midi_test/src/main.c +++ b/examples/device/midi_test/src/main.c @@ -132,7 +132,7 @@ void midi_task(void) // regardless of these being used or not. Therefore incoming traffic should be read // (possibly just discarded) to avoid the sender blocking in IO uint8_t packet[4]; - while(tud_midi_available()) tud_midi_receive(packet); + while ( tud_midi_available() ) tud_midi_packet_read(packet); // send note every 1000 ms if (board_millis() - start_ms < 286) return; // not enough time @@ -146,10 +146,12 @@ void midi_task(void) if (previous < 0) previous = sizeof(note_sequence) - 1; // Send Note On for current position at full velocity (127) on channel 1. - tud_midi_write24(cable_num, 0x90 | channel, note_sequence[note_pos], 127); + uint8_t note_on[3] = { 0x90 | channel, note_sequence[note_pos], 127 }; + tud_midi_write(cable_num, note_on, 3); // Send Note Off for previous note. - tud_midi_write24(cable_num, 0x80 | channel, note_sequence[previous], 0); + uint8_t note_off[3] = { 0x80 | channel, note_sequence[previous], 0}; + tud_midi_write(cable_num, note_off, 3); // Increment position note_pos++; diff --git a/examples/make.mk b/examples/make.mk index e04a2592..ffcb8ee5 100644 --- a/examples/make.mk +++ b/examples/make.mk @@ -103,7 +103,7 @@ CFLAGS += \ # Debugging/Optimization ifeq ($(DEBUG), 1) - CFLAGS += -Og + CFLAGS += -O0 else CFLAGS += -Os endif diff --git a/src/class/midi/midi.h b/src/class/midi/midi.h index f758b6e1..74dc4174 100644 --- a/src/class/midi/midi.h +++ b/src/class/midi/midi.h @@ -61,6 +61,51 @@ typedef enum MIDI_JACK_EXTERNAL = 0x02 } midi_jack_type_t; +typedef enum +{ + MIDI_CIN_MISC = 0, + MIDI_CIN_CABLE_EVENT = 1, + MIDI_CIN_SYSCOM_2BYTE = 2, // 2 byte system common message e.g MTC, SongSelect + MIDI_CIN_SYSCOM_3BYTE = 3, // 3 byte system common message e.g SPP + MIDI_CIN_SYSEX_START = 4, // SysEx starts or continue + MIDI_CIN_SYSEX_END_1BYTE = 5, // SysEx ends with 1 data, or 1 byte system common message + MIDI_CIN_SYSEX_END_2BYTE = 6, // SysEx ends with 2 data + MIDI_CIN_SYSEX_END_3BYTE = 7, // SysEx ends with 3 data + MIDI_CIN_NOTE_ON = 8, + MIDI_CIN_NOTE_OFF = 9, + MIDI_CIN_POLY_KEYPRESS = 10, + MIDI_CIN_CONTROL_CHANGE = 11, + MIDI_CIN_PROGRAM_CHANGE = 12, + MIDI_CIN_CHANNEL_PRESSURE = 13, + MIDI_CIN_PITCH_BEND_CHANGE = 14, + MIDI_CIN_1BYTE_DATA = 15 +} midi_code_index_number_t; + +// MIDI 1.0 status byte +enum +{ + //------------- System Exclusive -------------// + MIDI_STATUS_SYSEX_START = 0xF0, + MIDI_STATUS_SYSEX_END = 0xF7, + + //------------- System Common -------------// + MIDI_STATUS_SYSCOM_TIME_CODE_QUARTER_FRAME = 0xF1, + MIDI_STATUS_SYSCOM_SONG_POSITION_POINTER = 0xF2, + MIDI_STATUS_SYSCOM_SONG_SELECT = 0xF3, + // F4, F5 is undefined + MIDI_STATUS_SYSCOM_TUNE_REQUEST = 0xF6, + + //------------- System RealTime -------------// + MIDI_STATUS_SYSREAL_TIMING_CLOCK = 0xF8, + // 0xF9 is undefined + MIDI_STATUS_SYSREAL_START = 0xFA, + MIDI_STATUS_SYSREAL_CONTINUE = 0xFB, + MIDI_STATUS_SYSREAL_STOP = 0xFC, + // 0xFD is undefined + MIDI_STATUS_SYSREAL_ACTIVE_SENSING = 0xFE, + MIDI_STATUS_SYSREAL_SYSTEM_RESET = 0xFF, +}; + /// MIDI Interface Header Descriptor typedef struct TU_ATTR_PACKED { diff --git a/src/class/midi/midi_device.c b/src/class/midi/midi_device.c index 1ff81c39..cba1dcca 100644 --- a/src/class/midi/midi_device.c +++ b/src/class/midi/midi_device.c @@ -38,6 +38,7 @@ //--------------------------------------------------------------------+ // MACRO CONSTANT TYPEDEF //--------------------------------------------------------------------+ + typedef struct { uint8_t itf_num; @@ -126,16 +127,19 @@ uint32_t tud_midi_n_read(uint8_t itf, uint8_t cable_num, void* buffer, uint32_t midid_interface_t* midi = &_midid_itf[itf]; // Fill empty buffer - if (midi->read_buffer_length == 0) { - if (!tud_midi_n_packet_read(itf, midi->read_buffer)) return 0; + if ( midi->read_buffer_length == 0 ) + { + if ( !tud_midi_n_packet_read(itf, midi->read_buffer) ) return 0; uint8_t code_index = midi->read_buffer[0] & 0x0f; // We always copy over the first byte. uint8_t count = 1; // Ignore subsequent bytes based on the code. - if (code_index != 0x5 && code_index != 0xf) { + if ( code_index != 0x5 && code_index != 0xf ) + { count = 2; - if (code_index != 0x2 && code_index != 0x6 && code_index != 0xc && code_index != 0xd) { + if ( code_index != 0x2 && code_index != 0x6 && code_index != 0xc && code_index != 0xd ) + { count = 3; } } @@ -150,7 +154,8 @@ uint32_t tud_midi_n_read(uint8_t itf, uint8_t cable_num, void* buffer, uint32_t memcpy(buffer, midi->read_buffer + 1 + midi->read_target_length, n); midi->read_target_length += n; - if (midi->read_target_length == midi->read_buffer_length) { + if ( midi->read_target_length == midi->read_buffer_length ) + { midi->read_buffer_length = 0; midi->read_target_length = 0; } @@ -166,10 +171,6 @@ bool tud_midi_n_packet_read (uint8_t itf, uint8_t packet[4]) return (num_read == 4); } -void midi_rx_done_cb(midid_interface_t* midi, uint8_t const* buffer, uint32_t bufsize) { - tu_fifo_write_n(&midi->rx_ff, buffer, bufsize); -} - //--------------------------------------------------------------------+ // WRITE API //--------------------------------------------------------------------+ @@ -185,7 +186,8 @@ static uint32_t write_flush(midid_interface_t* midi) TU_VERIFY( usbd_edpt_claim(rhport, midi->ep_in), 0 ); uint16_t count = tu_fifo_read_n(&midi->tx_ff, midi->epin_buf, CFG_TUD_MIDI_EP_BUFSIZE); - if (count > 0) + + if (count) { TU_ASSERT( usbd_edpt_xfer(rhport, midi->ep_in, midi->epin_buf, count), 0 ); return count; @@ -202,21 +204,26 @@ uint32_t tud_midi_n_write(uint8_t itf, uint8_t cable_num, uint8_t const* buffer, midid_interface_t* midi = &_midid_itf[itf]; TU_VERIFY(midi->itf_num, 0); + uint32_t written = 0; uint32_t i = 0; while ( i < bufsize ) { - uint8_t data = buffer[i]; + uint8_t const data = buffer[i]; + if ( midi->write_buffer_length == 0 ) { - uint8_t msg = data >> 4; + // new packet + + uint8_t const msg = data >> 4; midi->write_buffer[1] = data; midi->write_buffer_length = 2; + // Check to see if we're still in a SysEx transmit. - if ( midi->write_buffer[0] == 0x4 ) + if ( midi->write_buffer[0] == MIDI_CIN_SYSEX_START ) { - if ( data == 0xf7 ) + if ( data == MIDI_STATUS_SYSEX_END ) { - midi->write_buffer[0] = 0x5; + midi->write_buffer[0] = MIDI_CIN_SYSEX_END_1BYTE; midi->write_target_length = 2; } else @@ -226,29 +233,31 @@ uint32_t tud_midi_n_write(uint8_t itf, uint8_t cable_num, uint8_t const* buffer, } else if ( (msg >= 0x8 && msg <= 0xB) || msg == 0xE ) { - midi->write_buffer[0] = cable_num << 4 | msg; + // Channel Voice Messages + midi->write_buffer[0] = (cable_num << 4) | msg; midi->write_target_length = 4; } else if ( msg == 0xf ) { - if ( data == 0xf0 ) + // System message + if ( data == MIDI_STATUS_SYSEX_START ) { - midi->write_buffer[0] = 0x4; + midi->write_buffer[0] = MIDI_CIN_SYSEX_START; midi->write_target_length = 4; } - else if ( data == 0xf1 || data == 0xf3 ) + else if ( data == MIDI_STATUS_SYSCOM_TIME_CODE_QUARTER_FRAME || data == MIDI_STATUS_SYSCOM_SONG_SELECT ) { - midi->write_buffer[0] = 0x2; + midi->write_buffer[0] = MIDI_CIN_SYSCOM_2BYTE; midi->write_target_length = 3; } - else if ( data == 0xf2 ) + else if ( data == MIDI_STATUS_SYSCOM_SONG_POSITION_POINTER ) { - midi->write_buffer[0] = 0x3; + midi->write_buffer[0] = MIDI_CIN_SYSCOM_3BYTE; midi->write_target_length = 4; } else { - midi->write_buffer[0] = 0x5; + midi->write_buffer[0] = MIDI_CIN_SYSEX_END_1BYTE; midi->write_target_length = 2; } } @@ -264,33 +273,44 @@ uint32_t tud_midi_n_write(uint8_t itf, uint8_t cable_num, uint8_t const* buffer, } else { + // On-going packet + TU_ASSERT(midi->write_buffer_length < 4, 0); midi->write_buffer[midi->write_buffer_length] = data; - midi->write_buffer_length += 1; + midi->write_buffer_length++; + // See if this byte ends a SysEx. - if ( midi->write_buffer[0] == 0x4 && data == 0xf7 ) + if ( midi->write_buffer[0] == MIDI_CIN_SYSEX_START && data == MIDI_STATUS_SYSEX_END ) { - midi->write_buffer[0] = 0x4 + (midi->write_buffer_length - 1); + midi->write_buffer[0] = MIDI_CIN_SYSEX_START + (midi->write_buffer_length - 1); midi->write_target_length = midi->write_buffer_length; } } + // Send out packet if ( midi->write_buffer_length == midi->write_target_length ) { - uint16_t written = tu_fifo_write_n(&midi->tx_ff, midi->write_buffer, 4); - if ( written < 4 ) - { - TU_ASSERT(written == 0); - break; - } - midi->write_buffer_length = 0; + // zeroes unused bytes + for(uint8_t idx = midi->write_target_length; idx < 4; idx++) midi->write_buffer[idx] = 0; + + uint16_t const count = tu_fifo_write_n(&midi->tx_ff, midi->write_buffer, 4); + + // reset buffer + midi->write_buffer_length = midi->write_target_length = 0; + + // fifo overflow, here we assume FIFO is multiple of 4 and didn't check remaining before writing + if ( count != 4 ) break; + + // updated written if succeeded + written = i; } + i++; } write_flush(midi); - return i; + return written; } bool tud_midi_n_packet_write (uint8_t itf, uint8_t const packet[4]) @@ -300,8 +320,7 @@ bool tud_midi_n_packet_write (uint8_t itf, uint8_t const packet[4]) return 0; } - if (tu_fifo_remaining(&midi->tx_ff) < 4) - return false; + if (tu_fifo_remaining(&midi->tx_ff) < 4) return false; tu_fifo_write_n(&midi->tx_ff, packet, 4); write_flush(midi); @@ -347,9 +366,9 @@ void midid_reset(uint8_t rhport) uint16_t midid_open(uint8_t rhport, tusb_desc_interface_t const * desc_itf, uint16_t max_len) { // 1st Interface is Audio Control v1 - TU_VERIFY(TUSB_CLASS_AUDIO == desc_itf->bInterfaceClass && - AUDIO_SUBCLASS_CONTROL == desc_itf->bInterfaceSubClass && - AUDIO_FUNC_PROTOCOL_CODE_UNDEF == desc_itf->bInterfaceProtocol, 0); + TU_VERIFY(TUSB_CLASS_AUDIO == desc_itf->bInterfaceClass && + AUDIO_SUBCLASS_CONTROL == desc_itf->bInterfaceSubClass && + AUDIO_FUNC_PROTOCOL_CODE_UNDEF == desc_itf->bInterfaceProtocol, 0); uint16_t drv_len = tu_desc_len(desc_itf); uint8_t const * p_desc = tu_desc_next(desc_itf); @@ -365,9 +384,9 @@ uint16_t midid_open(uint8_t rhport, tusb_desc_interface_t const * desc_itf, uint TU_VERIFY(TUSB_DESC_INTERFACE == tu_desc_type(p_desc), 0); tusb_desc_interface_t const * desc_midi = (tusb_desc_interface_t const *) p_desc; - TU_VERIFY(TUSB_CLASS_AUDIO == desc_midi->bInterfaceClass && - AUDIO_SUBCLASS_MIDI_STREAMING == desc_midi->bInterfaceSubClass && - AUDIO_FUNC_PROTOCOL_CODE_UNDEF == desc_midi->bInterfaceProtocol, 0); + TU_VERIFY(TUSB_CLASS_AUDIO == desc_midi->bInterfaceClass && + AUDIO_SUBCLASS_MIDI_STREAMING == desc_midi->bInterfaceSubClass && + AUDIO_FUNC_PROTOCOL_CODE_UNDEF == desc_midi->bInterfaceProtocol, 0); // Find available interface midid_interface_t * p_midi = NULL; diff --git a/src/class/midi/midi_device.h b/src/class/midi/midi_device.h index 1060fd77..aaceaf62 100644 --- a/src/class/midi/midi_device.h +++ b/src/class/midi/midi_device.h @@ -59,16 +59,28 @@ // Application API (Multiple Interfaces) // CFG_TUD_MIDI > 1 //--------------------------------------------------------------------+ + +// Check if midi interface is mounted bool tud_midi_n_mounted (uint8_t itf); + +// Get the number of bytes available for reading uint32_t tud_midi_n_available (uint8_t itf, uint8_t cable_num); + +// Read byte stream (legacy) uint32_t tud_midi_n_read (uint8_t itf, uint8_t cable_num, void* buffer, uint32_t bufsize); + +// Write byte Stream (legacy) uint32_t tud_midi_n_write (uint8_t itf, uint8_t cable_num, uint8_t const* buffer, uint32_t bufsize); +// Write good-old 3 bytes data, this use write packet static inline uint32_t tud_midi_n_write24 (uint8_t itf, uint8_t cable_num, uint8_t b1, uint8_t b2, uint8_t b3); -bool tud_midi_n_packet_read (uint8_t itf, uint8_t packet[4]); -bool tud_midi_n_packet_write (uint8_t itf, uint8_t const packet[4]); +// Read event packet (4 bytes) +bool tud_midi_n_packet_read (uint8_t itf, uint8_t packet[4]); + +// Write event packet (4 bytes) +bool tud_midi_n_packet_write (uint8_t itf, uint8_t const packet[4]); //--------------------------------------------------------------------+ // Application API (Single Interface) From 6b04efd443c3299131135849b736a2f2ce5877ac Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 2 Apr 2021 13:55:51 +0700 Subject: [PATCH 65/72] refactor midi stream read --- src/class/midi/midi_device.c | 51 +++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/src/class/midi/midi_device.c b/src/class/midi/midi_device.c index cba1dcca..14748f18 100644 --- a/src/class/midi/midi_device.c +++ b/src/class/midi/midi_device.c @@ -39,6 +39,13 @@ // MACRO CONSTANT TYPEDEF //--------------------------------------------------------------------+ +typedef struct +{ + uint8_t buffer[4]; + uint8_t index; + uint8_t total; +}midid_stream_t; + typedef struct { uint8_t itf_num; @@ -57,12 +64,15 @@ typedef struct osal_mutex_def_t tx_ff_mutex; #endif + // For Stream read()/write() API // Messages are always 4 bytes long, queue them for reading and writing so the // callers can use the Stream interface with single-byte read/write calls. uint8_t write_buffer[4]; uint8_t write_buffer_length; uint8_t write_target_length; +// midid_stream_t stream_write; + uint8_t read_buffer[4]; uint8_t read_buffer_length; uint8_t read_target_length; @@ -129,26 +139,41 @@ uint32_t tud_midi_n_read(uint8_t itf, uint8_t cable_num, void* buffer, uint32_t // Fill empty buffer if ( midi->read_buffer_length == 0 ) { - if ( !tud_midi_n_packet_read(itf, midi->read_buffer) ) return 0; + TU_VERIFY(tud_midi_n_packet_read(itf, midi->read_buffer), 0); - uint8_t code_index = midi->read_buffer[0] & 0x0f; - // We always copy over the first byte. - uint8_t count = 1; - // Ignore subsequent bytes based on the code. - if ( code_index != 0x5 && code_index != 0xf ) + uint8_t const code_index = midi->read_buffer[0] & 0x0f; + uint8_t count; + + // MIDI 1.0 Table 4-1: Code Index Number Classifications + switch(code_index) { - count = 2; - if ( code_index != 0x2 && code_index != 0x6 && code_index != 0xc && code_index != 0xd ) - { + case MIDI_CIN_MISC: + case MIDI_CIN_CABLE_EVENT: + // These are reserved and unused, possibly issue somewhere, skip this packet + return 0; + break; + + case MIDI_CIN_SYSEX_END_1BYTE: + case MIDI_CIN_1BYTE_DATA: + count = 1; + break; + + case MIDI_CIN_SYSCOM_2BYTE : + case MIDI_CIN_SYSEX_END_2BYTE : + case MIDI_CIN_PROGRAM_CHANGE : + case MIDI_CIN_CHANNEL_PRESSURE : + count = 2; + break; + + default: count = 3; - } + break; } midi->read_buffer_length = count; } - uint32_t n = midi->read_buffer_length - midi->read_target_length; - if (bufsize < n) n = bufsize; + uint32_t n = tu_min32(midi->read_buffer_length - midi->read_target_length, bufsize); // Skip the header in the buffer memcpy(buffer, midi->read_buffer + 1 + midi->read_target_length, n); @@ -204,6 +229,8 @@ uint32_t tud_midi_n_write(uint8_t itf, uint8_t cable_num, uint8_t const* buffer, midid_interface_t* midi = &_midid_itf[itf]; TU_VERIFY(midi->itf_num, 0); +// midid_stream_t* stream = &midi->stream_write; + uint32_t written = 0; uint32_t i = 0; while ( i < bufsize ) From 08fe16840fcc39e4cb7c1f55fa56762427734753 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 2 Apr 2021 14:26:55 +0700 Subject: [PATCH 66/72] refactor midi write into stream --- src/class/midi/midi_device.c | 77 +++++++++++++++++------------------- 1 file changed, 37 insertions(+), 40 deletions(-) diff --git a/src/class/midi/midi_device.c b/src/class/midi/midi_device.c index 14748f18..49bf2a27 100644 --- a/src/class/midi/midi_device.c +++ b/src/class/midi/midi_device.c @@ -67,11 +67,7 @@ typedef struct // For Stream read()/write() API // Messages are always 4 bytes long, queue them for reading and writing so the // callers can use the Stream interface with single-byte read/write calls. - uint8_t write_buffer[4]; - uint8_t write_buffer_length; - uint8_t write_target_length; - -// midid_stream_t stream_write; + midid_stream_t stream_write; uint8_t read_buffer[4]; uint8_t read_buffer_length; @@ -229,7 +225,7 @@ uint32_t tud_midi_n_write(uint8_t itf, uint8_t cable_num, uint8_t const* buffer, midid_interface_t* midi = &_midid_itf[itf]; TU_VERIFY(midi->itf_num, 0); -// midid_stream_t* stream = &midi->stream_write; + midid_stream_t* stream = &midi->stream_write; uint32_t written = 0; uint32_t i = 0; @@ -237,93 +233,94 @@ uint32_t tud_midi_n_write(uint8_t itf, uint8_t cable_num, uint8_t const* buffer, { uint8_t const data = buffer[i]; - if ( midi->write_buffer_length == 0 ) + if ( stream->index == 0 ) { - // new packet + // new event packet uint8_t const msg = data >> 4; - midi->write_buffer[1] = data; - midi->write_buffer_length = 2; + + stream->index = 2; + stream->buffer[1] = data; // Check to see if we're still in a SysEx transmit. - if ( midi->write_buffer[0] == MIDI_CIN_SYSEX_START ) + if ( stream->buffer[0] == MIDI_CIN_SYSEX_START ) { if ( data == MIDI_STATUS_SYSEX_END ) { - midi->write_buffer[0] = MIDI_CIN_SYSEX_END_1BYTE; - midi->write_target_length = 2; + stream->buffer[0] = MIDI_CIN_SYSEX_END_1BYTE; + stream->total = 2; } else { - midi->write_target_length = 4; + stream->total = 4; } } else if ( (msg >= 0x8 && msg <= 0xB) || msg == 0xE ) { // Channel Voice Messages - midi->write_buffer[0] = (cable_num << 4) | msg; - midi->write_target_length = 4; + stream->buffer[0] = (cable_num << 4) | msg; + stream->total = 4; } else if ( msg == 0xf ) { // System message if ( data == MIDI_STATUS_SYSEX_START ) { - midi->write_buffer[0] = MIDI_CIN_SYSEX_START; - midi->write_target_length = 4; + stream->buffer[0] = MIDI_CIN_SYSEX_START; + stream->total = 4; } else if ( data == MIDI_STATUS_SYSCOM_TIME_CODE_QUARTER_FRAME || data == MIDI_STATUS_SYSCOM_SONG_SELECT ) { - midi->write_buffer[0] = MIDI_CIN_SYSCOM_2BYTE; - midi->write_target_length = 3; + stream->buffer[0] = MIDI_CIN_SYSCOM_2BYTE; + stream->total = 3; } else if ( data == MIDI_STATUS_SYSCOM_SONG_POSITION_POINTER ) { - midi->write_buffer[0] = MIDI_CIN_SYSCOM_3BYTE; - midi->write_target_length = 4; + stream->buffer[0] = MIDI_CIN_SYSCOM_3BYTE; + stream->total = 4; } else { - midi->write_buffer[0] = MIDI_CIN_SYSEX_END_1BYTE; - midi->write_target_length = 2; + stream->buffer[0] = MIDI_CIN_SYSEX_END_1BYTE; + stream->total = 2; } } else { // Pack individual bytes if we don't support packing them into words. - midi->write_buffer[0] = cable_num << 4 | 0xf; - midi->write_buffer[2] = 0; - midi->write_buffer[3] = 0; - midi->write_buffer_length = 2; - midi->write_target_length = 2; + stream->buffer[0] = cable_num << 4 | 0xf; + stream->buffer[2] = 0; + stream->buffer[3] = 0; + stream->index = 2; + stream->total = 2; } } else { - // On-going packet + // On-going (buffering) packet - TU_ASSERT(midi->write_buffer_length < 4, 0); - midi->write_buffer[midi->write_buffer_length] = data; - midi->write_buffer_length++; + TU_ASSERT(stream->index < 4, written); + stream->buffer[stream->index] = data; + stream->index++; // See if this byte ends a SysEx. - if ( midi->write_buffer[0] == MIDI_CIN_SYSEX_START && data == MIDI_STATUS_SYSEX_END ) + if ( stream->buffer[0] == MIDI_CIN_SYSEX_START && data == MIDI_STATUS_SYSEX_END ) { - midi->write_buffer[0] = MIDI_CIN_SYSEX_START + (midi->write_buffer_length - 1); - midi->write_target_length = midi->write_buffer_length; + stream->buffer[0] = MIDI_CIN_SYSEX_START + (stream->index - 1); + stream->total = stream->index; } } // Send out packet - if ( midi->write_buffer_length == midi->write_target_length ) + if ( stream->index == stream->total ) { // zeroes unused bytes - for(uint8_t idx = midi->write_target_length; idx < 4; idx++) midi->write_buffer[idx] = 0; + for(uint8_t idx = stream->total; idx < 4; idx++) stream->buffer[idx] = 0; - uint16_t const count = tu_fifo_write_n(&midi->tx_ff, midi->write_buffer, 4); + uint16_t const count = tu_fifo_write_n(&midi->tx_ff, stream->buffer, 4); // reset buffer - midi->write_buffer_length = midi->write_target_length = 0; + stream->index = stream->total = 0; // fifo overflow, here we assume FIFO is multiple of 4 and didn't check remaining before writing if ( count != 4 ) break; From 99b78e62f2172988ffa3835b7d6bcaaf455cef10 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 2 Apr 2021 14:34:13 +0700 Subject: [PATCH 67/72] removed tud_midi_write24() --- src/class/midi/midi_device.h | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/src/class/midi/midi_device.h b/src/class/midi/midi_device.h index aaceaf62..c875748f 100644 --- a/src/class/midi/midi_device.h +++ b/src/class/midi/midi_device.h @@ -72,10 +72,6 @@ uint32_t tud_midi_n_read (uint8_t itf, uint8_t cable_num, void* buffer, ui // Write byte Stream (legacy) uint32_t tud_midi_n_write (uint8_t itf, uint8_t cable_num, uint8_t const* buffer, uint32_t bufsize); -// Write good-old 3 bytes data, this use write packet -static inline -uint32_t tud_midi_n_write24 (uint8_t itf, uint8_t cable_num, uint8_t b1, uint8_t b2, uint8_t b3); - // Read event packet (4 bytes) bool tud_midi_n_packet_read (uint8_t itf, uint8_t packet[4]); @@ -87,13 +83,26 @@ bool tud_midi_n_packet_write (uint8_t itf, uint8_t const packet[4]); //--------------------------------------------------------------------+ static inline bool tud_midi_mounted (void); static inline uint32_t tud_midi_available (void); + static inline uint32_t tud_midi_read (void* buffer, uint32_t bufsize); static inline uint32_t tud_midi_write (uint8_t cable_num, uint8_t const* buffer, uint32_t bufsize); -static inline uint32_t tud_midi_write24 (uint8_t cable_num, uint8_t b1, uint8_t b2, uint8_t b3); static inline bool tud_midi_packet_read (uint8_t packet[4]); static inline bool tud_midi_packet_write(uint8_t const packet[4]); +// TODO remove after 0.10.0 release +TU_ATTR_DEPRECATED("tud_midi_send() is renamed to tud_midi_packet_write()") +static inline bool tud_midi_send(uint8_t packet[4]) +{ + return tud_midi_packet_write(packet); +} + +TU_ATTR_DEPRECATED("tud_midi_receive() is renamed to tud_midi_packet_read()") +static inline bool tud_midi_receive(uint8_t packet[4]) +{ + return tud_midi_packet_read(packet); +} + //--------------------------------------------------------------------+ // Application Callback API (weak is optional) //--------------------------------------------------------------------+ @@ -103,12 +112,6 @@ TU_ATTR_WEAK void tud_midi_rx_cb(uint8_t itf); // Inline Functions //--------------------------------------------------------------------+ -static inline uint32_t tud_midi_n_write24 (uint8_t itf, uint8_t cable_num, uint8_t b1, uint8_t b2, uint8_t b3) -{ - uint8_t msg[3] = { b1, b2, b3 }; - return tud_midi_n_write(itf, cable_num, msg, 3); -} - static inline bool tud_midi_mounted (void) { return tud_midi_n_mounted(0); @@ -129,12 +132,6 @@ static inline uint32_t tud_midi_write (uint8_t cable_num, uint8_t const* buffer, return tud_midi_n_write(0, cable_num, buffer, bufsize); } -static inline uint32_t tud_midi_write24 (uint8_t cable_num, uint8_t b1, uint8_t b2, uint8_t b3) -{ - uint8_t msg[3] = { b1, b2, b3 }; - return tud_midi_write(cable_num, msg, 3); -} - static inline bool tud_midi_packet_read (uint8_t packet[4]) { return tud_midi_n_packet_read(0, packet); From da59c4ad4434b64691aa7a93e03381702633964d Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 2 Apr 2021 14:43:38 +0700 Subject: [PATCH 68/72] rename midi write()/read() to stream_write() stream_read() also add deprecated for warning and rename hint --- .../device/dynamic_configuration/src/main.c | 6 +- examples/device/midi_test/src/main.c | 4 +- src/class/midi/midi_device.c | 4 +- src/class/midi/midi_device.h | 55 ++++++++++++------- 4 files changed, 43 insertions(+), 26 deletions(-) diff --git a/examples/device/dynamic_configuration/src/main.c b/examples/device/dynamic_configuration/src/main.c index ce1f752d..4c10f55b 100644 --- a/examples/device/dynamic_configuration/src/main.c +++ b/examples/device/dynamic_configuration/src/main.c @@ -186,10 +186,12 @@ void midi_task(void) if (previous < 0) previous = sizeof(note_sequence) - 1; // Send Note On for current position at full velocity (127) on channel 1. - tud_midi_write24(cable_num, 0x90 | channel, note_sequence[note_pos], 127); + uint8_t note_on[3] = { 0x90 | channel, note_sequence[note_pos], 127 }; + tud_midi_stream_write(cable_num, note_on, 3); // Send Note Off for previous note. - tud_midi_write24(cable_num, 0x80 | channel, note_sequence[previous], 0); + uint8_t note_off[3] = { 0x80 | channel, note_sequence[previous], 0}; + tud_midi_stream_write(cable_num, note_off, 3); // Increment position note_pos++; diff --git a/examples/device/midi_test/src/main.c b/examples/device/midi_test/src/main.c index af10350d..9e0e82a1 100644 --- a/examples/device/midi_test/src/main.c +++ b/examples/device/midi_test/src/main.c @@ -147,11 +147,11 @@ void midi_task(void) // Send Note On for current position at full velocity (127) on channel 1. uint8_t note_on[3] = { 0x90 | channel, note_sequence[note_pos], 127 }; - tud_midi_write(cable_num, note_on, 3); + tud_midi_stream_write(cable_num, note_on, 3); // Send Note Off for previous note. uint8_t note_off[3] = { 0x80 | channel, note_sequence[previous], 0}; - tud_midi_write(cable_num, note_off, 3); + tud_midi_stream_write(cable_num, note_off, 3); // Increment position note_pos++; diff --git a/src/class/midi/midi_device.c b/src/class/midi/midi_device.c index 49bf2a27..e76f01db 100644 --- a/src/class/midi/midi_device.c +++ b/src/class/midi/midi_device.c @@ -127,7 +127,7 @@ uint32_t tud_midi_n_available(uint8_t itf, uint8_t cable_num) return tu_fifo_count(&_midid_itf[itf].rx_ff); } -uint32_t tud_midi_n_read(uint8_t itf, uint8_t cable_num, void* buffer, uint32_t bufsize) +uint32_t tud_midi_n_stream_read(uint8_t itf, uint8_t cable_num, void* buffer, uint32_t bufsize) { (void) cable_num; midid_interface_t* midi = &_midid_itf[itf]; @@ -220,7 +220,7 @@ static uint32_t write_flush(midid_interface_t* midi) } } -uint32_t tud_midi_n_write(uint8_t itf, uint8_t cable_num, uint8_t const* buffer, uint32_t bufsize) +uint32_t tud_midi_n_stream_write(uint8_t itf, uint8_t cable_num, uint8_t const* buffer, uint32_t bufsize) { midid_interface_t* midi = &_midid_itf[itf]; TU_VERIFY(midi->itf_num, 0); diff --git a/src/class/midi/midi_device.h b/src/class/midi/midi_device.h index c875748f..67f03930 100644 --- a/src/class/midi/midi_device.h +++ b/src/class/midi/midi_device.h @@ -61,36 +61,51 @@ //--------------------------------------------------------------------+ // Check if midi interface is mounted -bool tud_midi_n_mounted (uint8_t itf); +bool tud_midi_n_mounted (uint8_t itf); // Get the number of bytes available for reading -uint32_t tud_midi_n_available (uint8_t itf, uint8_t cable_num); +uint32_t tud_midi_n_available (uint8_t itf, uint8_t cable_num); -// Read byte stream (legacy) -uint32_t tud_midi_n_read (uint8_t itf, uint8_t cable_num, void* buffer, uint32_t bufsize); +// Read byte stream (legacy) +uint32_t tud_midi_n_stream_read (uint8_t itf, uint8_t cable_num, void* buffer, uint32_t bufsize); -// Write byte Stream (legacy) -uint32_t tud_midi_n_write (uint8_t itf, uint8_t cable_num, uint8_t const* buffer, uint32_t bufsize); +// Write byte Stream (legacy) +uint32_t tud_midi_n_stream_write (uint8_t itf, uint8_t cable_num, uint8_t const* buffer, uint32_t bufsize); -// Read event packet (4 bytes) -bool tud_midi_n_packet_read (uint8_t itf, uint8_t packet[4]); +// Read event packet (4 bytes) +bool tud_midi_n_packet_read (uint8_t itf, uint8_t packet[4]); -// Write event packet (4 bytes) -bool tud_midi_n_packet_write (uint8_t itf, uint8_t const packet[4]); +// Write event packet (4 bytes) +bool tud_midi_n_packet_write (uint8_t itf, uint8_t const packet[4]); //--------------------------------------------------------------------+ // Application API (Single Interface) //--------------------------------------------------------------------+ -static inline bool tud_midi_mounted (void); -static inline uint32_t tud_midi_available (void); +static inline bool tud_midi_mounted (void); +static inline uint32_t tud_midi_available (void); -static inline uint32_t tud_midi_read (void* buffer, uint32_t bufsize); -static inline uint32_t tud_midi_write (uint8_t cable_num, uint8_t const* buffer, uint32_t bufsize); +static inline uint32_t tud_midi_stream_read (void* buffer, uint32_t bufsize); +static inline uint32_t tud_midi_stream_write (uint8_t cable_num, uint8_t const* buffer, uint32_t bufsize); -static inline bool tud_midi_packet_read (uint8_t packet[4]); -static inline bool tud_midi_packet_write(uint8_t const packet[4]); +static inline bool tud_midi_packet_read (uint8_t packet[4]); +static inline bool tud_midi_packet_write (uint8_t const packet[4]); +//------------- Deprecated API name -------------// // TODO remove after 0.10.0 release + +TU_ATTR_DEPRECATED("tud_midi_read() is renamed to tud_midi_stream_read()") +static inline uint32_t tud_midi_read (void* buffer, uint32_t bufsize) +{ + return tud_midi_stream_read(buffer, bufsize); +} + +TU_ATTR_DEPRECATED("tud_midi_write() is renamed to tud_midi_stream_write()") +static inline uint32_t tud_midi_write(uint8_t cable_num, uint8_t const* buffer, uint32_t bufsize) +{ + return tud_midi_stream_write(cable_num, buffer, bufsize); +} + + TU_ATTR_DEPRECATED("tud_midi_send() is renamed to tud_midi_packet_write()") static inline bool tud_midi_send(uint8_t packet[4]) { @@ -122,14 +137,14 @@ static inline uint32_t tud_midi_available (void) return tud_midi_n_available(0, 0); } -static inline uint32_t tud_midi_read (void* buffer, uint32_t bufsize) +static inline uint32_t tud_midi_stream_read (void* buffer, uint32_t bufsize) { - return tud_midi_n_read(0, 0, buffer, bufsize); + return tud_midi_n_stream_read(0, 0, buffer, bufsize); } -static inline uint32_t tud_midi_write (uint8_t cable_num, uint8_t const* buffer, uint32_t bufsize) +static inline uint32_t tud_midi_stream_write (uint8_t cable_num, uint8_t const* buffer, uint32_t bufsize) { - return tud_midi_n_write(0, cable_num, buffer, bufsize); + return tud_midi_n_stream_write(0, cable_num, buffer, bufsize); } static inline bool tud_midi_packet_read (uint8_t packet[4]) From 350eb1127755f3ee0dd3dd186cc31e9492916a0c Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 2 Apr 2021 14:52:44 +0700 Subject: [PATCH 69/72] refactor midi read buffer to stream --- src/class/midi/midi_device.c | 39 +++++++++++++++++------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/src/class/midi/midi_device.c b/src/class/midi/midi_device.c index e76f01db..a4cc104a 100644 --- a/src/class/midi/midi_device.c +++ b/src/class/midi/midi_device.c @@ -68,10 +68,7 @@ typedef struct // Messages are always 4 bytes long, queue them for reading and writing so the // callers can use the Stream interface with single-byte read/write calls. midid_stream_t stream_write; - - uint8_t read_buffer[4]; - uint8_t read_buffer_length; - uint8_t read_target_length; + midid_stream_t stream_read; // Endpoint Transfer buffer CFG_TUSB_MEM_ALIGN uint8_t epout_buf[CFG_TUD_MIDI_EP_BUFSIZE]; @@ -131,14 +128,16 @@ uint32_t tud_midi_n_stream_read(uint8_t itf, uint8_t cable_num, void* buffer, ui { (void) cable_num; midid_interface_t* midi = &_midid_itf[itf]; + midid_stream_t* stream = &midi->stream_read; - // Fill empty buffer - if ( midi->read_buffer_length == 0 ) + TU_VERIFY(bufsize, 0); + + // Get new packet from fifo + if ( stream->total == 0 ) { - TU_VERIFY(tud_midi_n_packet_read(itf, midi->read_buffer), 0); + TU_VERIFY(tud_midi_n_packet_read(itf, stream->buffer), 0); - uint8_t const code_index = midi->read_buffer[0] & 0x0f; - uint8_t count; + uint8_t const code_index = stream->buffer[0] & 0x0f; // MIDI 1.0 Table 4-1: Code Index Number Classifications switch(code_index) @@ -151,34 +150,32 @@ uint32_t tud_midi_n_stream_read(uint8_t itf, uint8_t cable_num, void* buffer, ui case MIDI_CIN_SYSEX_END_1BYTE: case MIDI_CIN_1BYTE_DATA: - count = 1; + stream->total = 1; break; case MIDI_CIN_SYSCOM_2BYTE : case MIDI_CIN_SYSEX_END_2BYTE : case MIDI_CIN_PROGRAM_CHANGE : case MIDI_CIN_CHANNEL_PRESSURE : - count = 2; + stream->total = 2; break; default: - count = 3; + stream->total = 3; break; } - - midi->read_buffer_length = count; } - uint32_t n = tu_min32(midi->read_buffer_length - midi->read_target_length, bufsize); + uint32_t const n = tu_min32(stream->total - stream->index, bufsize); - // Skip the header in the buffer - memcpy(buffer, midi->read_buffer + 1 + midi->read_target_length, n); - midi->read_target_length += n; + // Skip the header (1st byte) in the buffer + memcpy(buffer, stream->buffer + 1 + stream->index, n); + stream->index += n; - if ( midi->read_target_length == midi->read_buffer_length ) + if ( stream->total == stream->index ) { - midi->read_buffer_length = 0; - midi->read_target_length = 0; + stream->index = 0; + stream->total = 0; } return n; From 48bb96f5072a173189d9076c5c2b1f5066327bf6 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 2 Apr 2021 15:08:36 +0700 Subject: [PATCH 70/72] correct midi stream read behavior to read until user buffer is full or no more data from usb fifo --- src/class/midi/midi_device.c | 117 +++++++++++++++++++---------------- 1 file changed, 65 insertions(+), 52 deletions(-) diff --git a/src/class/midi/midi_device.c b/src/class/midi/midi_device.c index a4cc104a..9ccbb733 100644 --- a/src/class/midi/midi_device.c +++ b/src/class/midi/midi_device.c @@ -52,6 +52,12 @@ typedef struct uint8_t ep_in; uint8_t ep_out; + // For Stream read()/write() API + // Messages are always 4 bytes long, queue them for reading and writing so the + // callers can use the Stream interface with single-byte read/write calls. + midid_stream_t stream_write; + midid_stream_t stream_read; + /*------------- From this point, data is not cleared by bus reset -------------*/ // FIFO tu_fifo_t rx_ff; @@ -64,12 +70,6 @@ typedef struct osal_mutex_def_t tx_ff_mutex; #endif - // For Stream read()/write() API - // Messages are always 4 bytes long, queue them for reading and writing so the - // callers can use the Stream interface with single-byte read/write calls. - midid_stream_t stream_write; - midid_stream_t stream_read; - // Endpoint Transfer buffer CFG_TUSB_MEM_ALIGN uint8_t epout_buf[CFG_TUD_MIDI_EP_BUFSIZE]; CFG_TUSB_MEM_ALIGN uint8_t epin_buf[CFG_TUD_MIDI_EP_BUFSIZE]; @@ -127,58 +127,71 @@ uint32_t tud_midi_n_available(uint8_t itf, uint8_t cable_num) uint32_t tud_midi_n_stream_read(uint8_t itf, uint8_t cable_num, void* buffer, uint32_t bufsize) { (void) cable_num; + TU_VERIFY(bufsize, 0); + + uint8_t* buf8 = (uint8_t*) buffer; + midid_interface_t* midi = &_midid_itf[itf]; midid_stream_t* stream = &midi->stream_read; - TU_VERIFY(bufsize, 0); - - // Get new packet from fifo - if ( stream->total == 0 ) + uint32_t total_read = 0; + while( bufsize ) { - TU_VERIFY(tud_midi_n_packet_read(itf, stream->buffer), 0); - - uint8_t const code_index = stream->buffer[0] & 0x0f; - - // MIDI 1.0 Table 4-1: Code Index Number Classifications - switch(code_index) + // Get new packet from fifo, then set packet expected bytes + if ( stream->total == 0 ) { - case MIDI_CIN_MISC: - case MIDI_CIN_CABLE_EVENT: - // These are reserved and unused, possibly issue somewhere, skip this packet - return 0; - break; + // return if there is no more data from fifo + if ( !tud_midi_n_packet_read(itf, stream->buffer) ) return total_read; - case MIDI_CIN_SYSEX_END_1BYTE: - case MIDI_CIN_1BYTE_DATA: - stream->total = 1; - break; + uint8_t const code_index = stream->buffer[0] & 0x0f; - case MIDI_CIN_SYSCOM_2BYTE : - case MIDI_CIN_SYSEX_END_2BYTE : - case MIDI_CIN_PROGRAM_CHANGE : - case MIDI_CIN_CHANNEL_PRESSURE : - stream->total = 2; - break; + // MIDI 1.0 Table 4-1: Code Index Number Classifications + switch(code_index) + { + case MIDI_CIN_MISC: + case MIDI_CIN_CABLE_EVENT: + // These are reserved and unused, possibly issue somewhere, skip this packet + return 0; + break; - default: - stream->total = 3; - break; + case MIDI_CIN_SYSEX_END_1BYTE: + case MIDI_CIN_1BYTE_DATA: + stream->total = 1; + break; + + case MIDI_CIN_SYSCOM_2BYTE : + case MIDI_CIN_SYSEX_END_2BYTE : + case MIDI_CIN_PROGRAM_CHANGE : + case MIDI_CIN_CHANNEL_PRESSURE : + stream->total = 2; + break; + + default: + stream->total = 3; + break; + } + } + + // Copy data up to bufsize + uint32_t const count = tu_min32(stream->total - stream->index, bufsize); + + // Skip the header (1st byte) in the buffer + memcpy(buf8, stream->buffer + 1 + stream->index, count); + + total_read += count; + stream->index += count; + buf8 += count; + bufsize -= count; + + // complete current event packet, reset stream + if ( stream->total == stream->index ) + { + stream->index = 0; + stream->total = 0; } } - uint32_t const n = tu_min32(stream->total - stream->index, bufsize); - - // Skip the header (1st byte) in the buffer - memcpy(buffer, stream->buffer + 1 + stream->index, n); - stream->index += n; - - if ( stream->total == stream->index ) - { - stream->index = 0; - stream->total = 0; - } - - return n; + return total_read; } bool tud_midi_n_packet_read (uint8_t itf, uint8_t packet[4]) @@ -224,7 +237,7 @@ uint32_t tud_midi_n_stream_write(uint8_t itf, uint8_t cable_num, uint8_t const* midid_stream_t* stream = &midi->stream_write; - uint32_t written = 0; + uint32_t total_written = 0; uint32_t i = 0; while ( i < bufsize ) { @@ -296,7 +309,7 @@ uint32_t tud_midi_n_stream_write(uint8_t itf, uint8_t cable_num, uint8_t const* { // On-going (buffering) packet - TU_ASSERT(stream->index < 4, written); + TU_ASSERT(stream->index < 4, total_written); stream->buffer[stream->index] = data; stream->index++; @@ -316,14 +329,14 @@ uint32_t tud_midi_n_stream_write(uint8_t itf, uint8_t cable_num, uint8_t const* uint16_t const count = tu_fifo_write_n(&midi->tx_ff, stream->buffer, 4); - // reset buffer + // complete current event packet, reset stream stream->index = stream->total = 0; // fifo overflow, here we assume FIFO is multiple of 4 and didn't check remaining before writing if ( count != 4 ) break; // updated written if succeeded - written = i; + total_written = i; } i++; @@ -331,7 +344,7 @@ uint32_t tud_midi_n_stream_write(uint8_t itf, uint8_t cable_num, uint8_t const* write_flush(midi); - return written; + return total_written; } bool tud_midi_n_packet_write (uint8_t itf, uint8_t const packet[4]) From 7582528067fcfc0a4fe6039cfcb00d2f4c702b53 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 2 Apr 2021 15:21:44 +0700 Subject: [PATCH 71/72] revert make optimize flag --- examples/make.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/make.mk b/examples/make.mk index ffcb8ee5..e04a2592 100644 --- a/examples/make.mk +++ b/examples/make.mk @@ -103,7 +103,7 @@ CFLAGS += \ # Debugging/Optimization ifeq ($(DEBUG), 1) - CFLAGS += -O0 + CFLAGS += -Og else CFLAGS += -Os endif From ab4d30fd6bca02c73eb9b4ff82db0b2b0f403344 Mon Sep 17 00:00:00 2001 From: Ha Thach Date: Fri, 2 Apr 2021 16:32:48 +0700 Subject: [PATCH 72/72] update readme and contributors for renesas rx63n and silabs efm32gg12 port (#767) * update readme and contributors for renesas rx63n and silabs efm32gg12 port also add some doc for changelog * typo * update more boards * more typo * typo 3 --- CONTRIBUTORS.md | 6 +++++- README.md | 2 ++ docs/boards.md | 11 ++++++++++- docs/changelog.md | 12 ++++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index d75a9d78..5ce352f5 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -33,6 +33,7 @@ - **[Koji KITAYAMA](https://github.com/kkitayam)** - Add new DCD port for **NXP Kinetis KL25** + - Add new DCD port for **Renesas RX63n** with GR-CITRUS board - **[Nathan Conrad](https://github.com/pigrew)** - Add new DCD port for **STM32 fsdev** Fullspeed device for STM32 L0, F0, F1, F3 etc ... @@ -47,6 +48,9 @@ - Board support for NuTiny NUC120, NUC121s, NUC125s, NUC126V, NUC505 - Improve multiple cdc interfaces API & add cdc_dual_ports example +- **[Rafael Silva](https://github.com/perigoso)** + - Add new DCD port for **Silabs EFM32GG12** with SLTB009A board + - **[Raspberry Pi Team](https://github.com/raspberrypi)** - Add new DCD port for **Raspberry Pi RP2040** @@ -59,7 +63,7 @@ - Add new class driver for **Musical Instrument Digital Interface (MIDI)** - Improve USBD control transfer, MSC, CDC class driver - Board support for Metro M0 & M4 express - - Write the execellent porting.md documentation + - Write the excellent porting.md documentation - Add initial Makefile - **[Sean Cross](https://github.com/xobs)** diff --git a/README.md b/README.md index 78ff5f0c..ddbd8a7f 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,8 @@ The stack supports the following MCUs: - Kinetis: KL25 - LPC Series: 11Uxx, 13xx, 175x_6x, 177x_8x, 18xx, 40xx, 43xx, 51Uxx, 54xxx, 55xx - **Raspberry Pi:** RP2040 +- **Renesas:** RX63N +- **Silabs:** EFM32GG12 - **Sony:** CXD56 - **ST:** STM32 series: L0, F0, F1, F2, F3, F4, F7, H7 both FullSpeed and HighSpeed - **TI:** MSP430 diff --git a/docs/boards.md b/docs/boards.md index 2b42b4d8..c23e7645 100644 --- a/docs/boards.md +++ b/docs/boards.md @@ -102,6 +102,10 @@ This code base already had supported for a handful of following boards (sorted a - [NGX LPC4330-Xplorer](https://www.nxp.com/design/designs/lpc4330-xplorer-board:OM13027) - [Double M33 Express](https://www.crowdsupply.com/steiert-solutions/double-m33-express) +### Renesas RX + +- [GR-CITRUS](https://www.renesas.com/us/en/products/gadget-renesas/boards/gr-citrus) + ### Raspberry Pi RP2040 - [Adafruit Feather RP2040](https://www.adafruit.com/product/4884) @@ -109,6 +113,10 @@ This code base already had supported for a handful of following boards (sorted a - [Adafruit QT Py RP2040](https://www.adafruit.com/product/4900) - [Raspberry Pi Pico](https://www.raspberrypi.org/products/raspberry-pi-pico/) +### Silabs + +- [EFM32GG12 Thunderboard Kit (SLTB009A)](https://www.silabs.com/development-tools/thunderboard/thunderboard-gg12-kit) + ### Sony - [Sony Spresense CXD5602](https://developer.sony.com/develop/spresense) @@ -121,13 +129,14 @@ This code base already had supported for a handful of following boards (sorted a - [STM32 L035c8 Discovery](https://www.st.com/en/evaluation-tools/32l0538discovery.html) - [STM32 L4R5zi Nucleo](https://www.st.com/en/evaluation-tools/nucleo-l4r5zi.html) - [STM32 F070rb Nucleo](https://www.st.com/en/evaluation-tools/nucleo-f070rb.html) +- [STM32 F072 Evaluation](https://www.st.com/en/evaluation-tools/stm32072b-eval.html) - [STM32 F072rb Discovery](https://www.st.com/en/evaluation-tools/32f072bdiscovery.html) - STM32 F103c Blue Pill - [STM32 F207zg Nucleo](https://www.st.com/en/evaluation-tools/nucleo-f207zg.html) - [STM32 F303vc Discovery](https://www.st.com/en/evaluation-tools/stm32f3discovery.html) - STM32 F401cc Black Pill - [STM32 F407vg Discovery](https://www.st.com/en/evaluation-tools/stm32f4discovery.html) -- STM32 F411ce Black Pill +- [STM32 F411ce Black Pill](https://www.adafruit.com/product/4877) - [STM32 F411ve Discovery](https://www.st.com/en/evaluation-tools/32f411ediscovery.html) - [STM32 F412zg Discovery](https://www.st.com/en/evaluation-tools/32f412gdiscovery.html) - [STM32 F723e Discovery](https://www.st.com/en/evaluation-tools/32f723ediscovery.html) diff --git a/docs/changelog.md b/docs/changelog.md index 0e5f12e8..96c7f689 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,17 @@ # TinyUSB Changelog +## WIP + +- Add new port Silabs EFM32GG12, board EFM32GG12 Thunderboard Kit (SLTB009A) +- Add new port Renesas RX63N, board GR-CITRUS +- MIDI + - Fix MIDI buffer overflow issue + - Rename tud_midi_read() to tud_midi_stream_read() + - Rename tud_midi_write() to tud_midi_stream_write() + - Rename tud_midi_receive() to tud_midi_packet_read() + - Rename tud_midi_send() to tud_midi_packet_write() +- New board stm32f072-eval + ## 0.9.0 - 2021.03.12 ### Device Stack