diff --git a/demos/host/host_cmsis_rtx/host_cmsis_rtx.uvopt b/demos/host/host_cmsis_rtx/host_cmsis_rtx.uvopt index ec755f33..56bb8698 100644 --- a/demos/host/host_cmsis_rtx/host_cmsis_rtx.uvopt +++ b/demos/host/host_cmsis_rtx/host_cmsis_rtx.uvopt @@ -417,10 +417,10 @@ 1 0 0 - 0 + 20 0 1 - 1 + 3 0 ..\src\main.c main.c @@ -449,10 +449,10 @@ 1 0 0 - 59 + 48 0 - 0 - 0 + 100 + 107 0 ..\src\keyboard_app.c keyboard_app.c @@ -499,7 +499,7 @@ 0 0 0 - 139 + 140 145 0 ..\src\msc_app.c @@ -771,7 +771,7 @@ 0 17 0 - 366 + 367 373 0 ..\..\..\tinyusb\host\usbh.c @@ -969,10 +969,10 @@ 1 0 0 - 52 + 0 0 - 3 - 9 + 1 + 1 0 ..\..\..\vendor\cmsis_rtos_rtx\RTX_Conf_CM.c RTX_Conf_CM.c @@ -1075,7 +1075,7 @@ 0 68 0 - 113 + 114 120 0 ..\..\..\mcu\lpc43xx\CMSIS_LPC43xx_DriverLib\src\system_LPC43xx.c @@ -1107,7 +1107,7 @@ 0 25 0 - 159 + 160 166 0 ..\..\..\mcu\lpc43xx\keil\startup_LPC43xx.s diff --git a/tinyusb/osal/osal_cmsis_rtx.h b/tinyusb/osal/osal_cmsis_rtx.h index 3e6297ee..cdeef61c 100644 --- a/tinyusb/osal/osal_cmsis_rtx.h +++ b/tinyusb/osal/osal_cmsis_rtx.h @@ -158,12 +158,12 @@ typedef osal_queue_t * osal_queue_handle_t; #define OSAL_QUEUE_DEF(name, queue_depth, type)\ osMailQDef(name, queue_depth, type); -#define OSAL_QUEUE_REF(name) osMailQ(name) +#define OSAL_QUEUE_REF(name) ((osal_queue_t*) osMailQ(name)) static inline osal_queue_handle_t osal_queue_create(osal_queue_t * const p_queue) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE; static inline osal_queue_handle_t osal_queue_create(osal_queue_t * const p_queue) { - return (NULL != osMailCreate(p_queue, NULL)) ? p_queue : NULL; + return (NULL != osMailCreate( (osMailQDef_t const *) p_queue, NULL)) ? p_queue : NULL; } static inline void osal_queue_receive (osal_queue_handle_t const queue_hdl, void *p_data, uint32_t msec, tusb_error_t *p_error) ATTR_ALWAYS_INLINE; diff --git a/vendor/cmsis_rtos_rtx/INC/RTX_CM_lib.h b/vendor/cmsis_rtos_rtx/INC/RTX_CM_lib.h index b5935fa0..9b931377 100644 --- a/vendor/cmsis_rtos_rtx/INC/RTX_CM_lib.h +++ b/vendor/cmsis_rtos_rtx/INC/RTX_CM_lib.h @@ -15,19 +15,19 @@ * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * - Neither the name of ARM nor the names of its contributors may be used - * to endorse or promote products derived from this software without + * - Neither the name of ARM 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 + * 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 COPYRIGHT HOLDERS AND CONTRIBUTORS 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) + * 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. *---------------------------------------------------------------------------*/ @@ -115,9 +115,9 @@ _declare_box8 (mp_stk, OS_STKSIZE*4, OS_TASK_CNT-OS_PRIV_CNT+1); uint32_t const mp_stk_size = sizeof(mp_stk); /* Memory pool for user specified stack allocation (+main, +timer) */ -#ifdef __CODE_RED -__attribute__ (( section(".data.$RAM2") )) // overflow RamLoc32 -#endif +//#ifdef __CODE_RED +//__attribute__ (( section(".data.$RAM2") )) // overflow RamLoc32 +//#endif uint64_t os_stack_mem[2+OS_PRIV_CNT+(OS_STACK_SZ/8)]; uint32_t const os_stack_sz = sizeof(os_stack_mem); @@ -147,7 +147,7 @@ osMessageQId osMessageQId_osTimerMessageQ; #endif /* Legacy RTX User Timers not used */ -uint32_t os_tmr = 0; +uint32_t os_tmr = 0; uint32_t const *m_tmr = NULL; uint16_t const mp_tmr_size = 0; @@ -315,7 +315,7 @@ __attribute ((noreturn)) void __cs3_start_c (void){ if (src != dst) for (count = 0; count != limit; count += sizeof (long long)) *dst++ = *src++; - else + else dst = (long long *)((char *)dst + limit); limit = rptr->zero_size; for (count = 0; count != limit; count += sizeof (long long)) @@ -365,7 +365,7 @@ extern void exit(int arg); __noreturn __stackless void __cmain(void) { int a; - + if (__low_level_init() != 0) { __iar_data_init3(); } diff --git a/vendor/cmsis_rtos_rtx/RTX_Conf_CM.c b/vendor/cmsis_rtos_rtx/RTX_Conf_CM.c index 6d74b6dd..502aa652 100644 --- a/vendor/cmsis_rtos_rtx/RTX_Conf_CM.c +++ b/vendor/cmsis_rtos_rtx/RTX_Conf_CM.c @@ -62,7 +62,7 @@ // Defines stack size for main thread. // Default: 200 #ifndef OS_MAINSTKSIZE - #define OS_MAINSTKSIZE 200 + #define OS_MAINSTKSIZE 50 #endif // Number of threads with user-provided stack size <0-250> @@ -76,7 +76,7 @@ // Defines the combined stack size for threads with user-provided stack size. // Default: 0 #ifndef OS_PRIVSTKSIZE - #define OS_PRIVSTKSIZE (8*1024) + #define OS_PRIVSTKSIZE (3*1024) #endif // Check for stack overflow