Skip to content

Commit 00b7700

Browse files
author
Cruz Monrreal
authored
Merge pull request #7875 from c1728p9/feature_CMSIS_5_0b521765
Update CMSIS to 5.4.0
2 parents 2e869df + c3f5b64 commit 00b7700

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2625
-1827
lines changed

TESTS/mbedmicro-rtos-mbed/MemoryPool/main.cpp

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -450,38 +450,6 @@ void test_mem_pool_free_realloc_first_complex(AllocType atype)
450450
}
451451
}
452452

453-
/* Robustness checks for free() function.
454-
*
455-
* Given block from the MemoryPool has been successfully deallocated.
456-
* When free operation is executed on this block again.
457-
* Then operation fails with osErrorResource status.
458-
*
459-
* */
460-
void test_mem_pool_free_on_freed_block()
461-
{
462-
MemoryPool<int, 1> mem_pool;
463-
int *p_block;
464-
osStatus status;
465-
466-
/* Allocate memory block. */
467-
p_block = mem_pool.alloc();
468-
469-
/* Show that memory pool block has been allocated. */
470-
TEST_ASSERT_NOT_NULL(p_block);
471-
472-
/* Free memory block. */
473-
status = mem_pool.free(p_block);
474-
475-
/* Check operation status. */
476-
TEST_ASSERT_EQUAL(osOK, status);
477-
478-
/* Free memory block again. */
479-
status = mem_pool.free(p_block);
480-
481-
/* Check operation status. */
482-
TEST_ASSERT_EQUAL(osErrorResource, status);
483-
}
484-
485453
/* Robustness checks for free() function.
486454
* Function under test is called with invalid parameters.
487455
*
@@ -601,7 +569,6 @@ Case cases[] = {
601569

602570
Case("Test: fail (out of free blocks).", test_mem_pool_alloc_fail_wrapper<int, 3>),
603571

604-
Case("Test: free() - robust (free block twice).", test_mem_pool_free_on_freed_block),
605572
Case("Test: free() - robust (free called with invalid param - NULL).", free_block_invalid_parameter_null),
606573
Case("Test: free() - robust (free called with invalid param).", free_block_invalid_parameter)
607574
};

TESTS/mbedmicro-rtos-mbed/mail/main.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -267,28 +267,6 @@ void test_free_null()
267267
TEST_ASSERT_EQUAL(osErrorParameter, status);
268268
}
269269

270-
/** Test same message memory deallocation twice
271-
272-
Given an empty mailbox
273-
Then allocate message memory
274-
When try to free it second time
275-
Then it return appropriate error code
276-
*/
277-
void test_free_twice()
278-
{
279-
osStatus status;
280-
Mail<uint32_t, 4> mail_box;
281-
282-
uint32_t *mail = mail_box.alloc();
283-
TEST_ASSERT_NOT_EQUAL(NULL, mail);
284-
285-
status = mail_box.free(mail);
286-
TEST_ASSERT_EQUAL(osOK, status);
287-
288-
status = mail_box.free(mail);
289-
TEST_ASSERT_EQUAL(osErrorResource, status);
290-
}
291-
292270
/** Test get from empty mailbox with timeout set
293271
294272
Given an empty mailbox
@@ -517,7 +495,6 @@ Case cases[] = {
517495
Case("Test message send order", test_order),
518496
Case("Test get with timeout on empty mailbox", test_get_empty_timeout),
519497
Case("Test get without timeout on empty mailbox", test_get_empty_no_timeout),
520-
Case("Test message free twice", test_free_twice),
521498
Case("Test null message free", test_free_null),
522499
Case("Test invalid message free", test_free_wrong),
523500
Case("Test message send/receive single thread and order", test_single_thread_order),

cmsis/TARGET_CORTEX_A/cmsis_gcc.h

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**************************************************************************//**
22
* @file cmsis_gcc.h
33
* @brief CMSIS compiler specific macros, functions, instructions
4-
* @version V1.0.1
5-
* @date 07. Sep 2017
4+
* @version V1.0.2
5+
* @date 09. April 2018
66
******************************************************************************/
77
/*
8-
* Copyright (c) 2009-2017 ARM Limited. All rights reserved.
8+
* Copyright (c) 2009-2018 Arm Limited. All rights reserved.
99
*
1010
* SPDX-License-Identifier: Apache-2.0
1111
*
@@ -450,7 +450,9 @@ __STATIC_FORCEINLINE uint32_t __get_FPSCR(void)
450450
{
451451
#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
452452
(defined (__FPU_USED ) && (__FPU_USED == 1U)) )
453-
#if __has_builtin(__builtin_arm_get_fpscr) || (__GNUC__ > 7) || (__GNUC__ == 7 && __GNUC_MINOR__ >= 2)
453+
#if __has_builtin(__builtin_arm_get_fpscr)
454+
// Re-enable using built-in when GCC has been fixed
455+
// || (__GNUC__ > 7) || (__GNUC__ == 7 && __GNUC_MINOR__ >= 2)
454456
/* see https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00443.html */
455457
return __builtin_arm_get_fpscr();
456458
#else
@@ -473,7 +475,9 @@ __STATIC_FORCEINLINE void __set_FPSCR(uint32_t fpscr)
473475
{
474476
#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
475477
(defined (__FPU_USED ) && (__FPU_USED == 1U)) )
476-
#if __has_builtin(__builtin_arm_set_fpscr) || (__GNUC__ > 7) || (__GNUC__ == 7 && __GNUC_MINOR__ >= 2)
478+
#if __has_builtin(__builtin_arm_set_fpscr)
479+
// Re-enable using built-in when GCC has been fixed
480+
// || (__GNUC__ > 7) || (__GNUC__ == 7 && __GNUC_MINOR__ >= 2)
477481
/* see https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00443.html */
478482
__builtin_arm_set_fpscr(fpscr);
479483
#else

cmsis/TARGET_CORTEX_A/cmsis_iccarm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**************************************************************************//**
22
* @file cmsis_iccarm.h
33
* @brief CMSIS compiler ICCARM (IAR Compiler for Arm) header file
4-
* @version V5.0.5
5-
* @date 10. January 2018
4+
* @version V5.0.6
5+
* @date 02. March 2018
66
******************************************************************************/
77

88
//------------------------------------------------------------------------------

cmsis/TARGET_CORTEX_A/core_ca.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**************************************************************************//**
22
* @file core_ca.h
33
* @brief CMSIS Cortex-A Core Peripheral Access Layer Header File
4-
* @version V1.00
5-
* @date 22. Feb 2017
4+
* @version V1.0.1
5+
* @date 07. May 2018
66
******************************************************************************/
77
/*
88
* Copyright (c) 2009-2017 ARM Limited. All rights reserved.
@@ -1284,8 +1284,6 @@ __STATIC_INLINE void GIC_SetPendingIRQ(IRQn_Type IRQn)
12841284
} else {
12851285
// INTID 0-15 Software Generated Interrupt
12861286
GICDistributor->SPENDSGIR[IRQn / 4U] = 1U << ((IRQn % 4U) * 8U);
1287-
// Forward the interrupt to the CPU interface that requested it
1288-
GICDistributor->SGIR = (IRQn | 0x02000000U);
12891287
}
12901288
}
12911289

cmsis/TARGET_CORTEX_M/cmsis_armcc.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,6 @@ __STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
337337
(defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */
338338

339339

340-
#if ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) )
341-
342340
/**
343341
\brief Get FPSCR
344342
\details Returns the current value of the Floating Point Status/Control register.
@@ -372,9 +370,6 @@ __STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
372370
#endif
373371
}
374372

375-
#endif /* ((defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) ) */
376-
377-
378373

379374
/*@} end of CMSIS_Core_RegAccFunctions */
380375

cmsis/TARGET_CORTEX_M/cmsis_armclang.h

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ __STATIC_FORCEINLINE uint32_t __get_xPSR(void)
237237
*/
238238
__STATIC_FORCEINLINE uint32_t __get_PSP(void)
239239
{
240-
register uint32_t result;
240+
uint32_t result;
241241

242242
__ASM volatile ("MRS %0, psp" : "=r" (result) );
243243
return(result);
@@ -252,7 +252,7 @@ __STATIC_FORCEINLINE uint32_t __get_PSP(void)
252252
*/
253253
__STATIC_FORCEINLINE uint32_t __TZ_get_PSP_NS(void)
254254
{
255-
register uint32_t result;
255+
uint32_t result;
256256

257257
__ASM volatile ("MRS %0, psp_ns" : "=r" (result) );
258258
return(result);
@@ -291,7 +291,7 @@ __STATIC_FORCEINLINE void __TZ_set_PSP_NS(uint32_t topOfProcStack)
291291
*/
292292
__STATIC_FORCEINLINE uint32_t __get_MSP(void)
293293
{
294-
register uint32_t result;
294+
uint32_t result;
295295

296296
__ASM volatile ("MRS %0, msp" : "=r" (result) );
297297
return(result);
@@ -306,7 +306,7 @@ __STATIC_FORCEINLINE uint32_t __get_MSP(void)
306306
*/
307307
__STATIC_FORCEINLINE uint32_t __TZ_get_MSP_NS(void)
308308
{
309-
register uint32_t result;
309+
uint32_t result;
310310

311311
__ASM volatile ("MRS %0, msp_ns" : "=r" (result) );
312312
return(result);
@@ -346,7 +346,7 @@ __STATIC_FORCEINLINE void __TZ_set_MSP_NS(uint32_t topOfMainStack)
346346
*/
347347
__STATIC_FORCEINLINE uint32_t __TZ_get_SP_NS(void)
348348
{
349-
register uint32_t result;
349+
uint32_t result;
350350

351351
__ASM volatile ("MRS %0, sp_ns" : "=r" (result) );
352352
return(result);
@@ -581,7 +581,7 @@ __STATIC_FORCEINLINE uint32_t __get_PSPLIM(void)
581581
// without main extensions, the non-secure PSPLIM is RAZ/WI
582582
return 0U;
583583
#else
584-
register uint32_t result;
584+
uint32_t result;
585585
__ASM volatile ("MRS %0, psplim" : "=r" (result) );
586586
return result;
587587
#endif
@@ -603,7 +603,7 @@ __STATIC_FORCEINLINE uint32_t __TZ_get_PSPLIM_NS(void)
603603
// without main extensions, the non-secure PSPLIM is RAZ/WI
604604
return 0U;
605605
#else
606-
register uint32_t result;
606+
uint32_t result;
607607
__ASM volatile ("MRS %0, psplim_ns" : "=r" (result) );
608608
return result;
609609
#endif
@@ -669,7 +669,7 @@ __STATIC_FORCEINLINE uint32_t __get_MSPLIM(void)
669669
// without main extensions, the non-secure MSPLIM is RAZ/WI
670670
return 0U;
671671
#else
672-
register uint32_t result;
672+
uint32_t result;
673673
__ASM volatile ("MRS %0, msplim" : "=r" (result) );
674674
return result;
675675
#endif
@@ -691,7 +691,7 @@ __STATIC_FORCEINLINE uint32_t __TZ_get_MSPLIM_NS(void)
691691
// without main extensions, the non-secure MSPLIM is RAZ/WI
692692
return 0U;
693693
#else
694-
register uint32_t result;
694+
uint32_t result;
695695
__ASM volatile ("MRS %0, msplim_ns" : "=r" (result) );
696696
return result;
697697
#endif
@@ -742,10 +742,6 @@ __STATIC_FORCEINLINE void __TZ_set_MSPLIM_NS(uint32_t MainStackPtrLimit)
742742
#endif /* ((defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) || \
743743
(defined (__ARM_ARCH_8M_BASE__ ) && (__ARM_ARCH_8M_BASE__ == 1)) ) */
744744

745-
746-
#if ((defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \
747-
(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) )
748-
749745
/**
750746
\brief Get FPSCR
751747
\details Returns the current value of the Floating Point Status/Control register.
@@ -770,10 +766,6 @@ __STATIC_FORCEINLINE void __TZ_set_MSPLIM_NS(uint32_t MainStackPtrLimit)
770766
#define __set_FPSCR(x) ((void)(x))
771767
#endif
772768

773-
#endif /* ((defined (__ARM_ARCH_7EM__ ) && (__ARM_ARCH_7EM__ == 1)) || \
774-
(defined (__ARM_ARCH_8M_MAIN__ ) && (__ARM_ARCH_8M_MAIN__ == 1)) ) */
775-
776-
777769

778770
/*@} end of CMSIS_Core_RegAccFunctions */
779771

0 commit comments

Comments
 (0)