raspberrypi / CMSIS-RP2xxx-DFP

BSD 3-Clause "New" or "Revised" License
17 stars 7 forks source link

Compatibility issue with cmsis 6.1.0 #1

Closed GorgonMeducer closed 6 months ago

GorgonMeducer commented 6 months ago

The pack currently can only works with cmsis 5.9.0.

Please do the following change to be compatible with the cmsis 6.1.0

  1. please remove this line https://github.com/raspberrypi/CMSIS-RP2xxx-DFP/blob/6d5064cf0dac4f27c1e7b79836fe441edb59b6d5/__wrapper/env_wrapper.h#L181C1-L181C26

add the following code:

#ifndef __PLOOC_VA_NUM_ARGS_IMPL
#   define __PLOOC_VA_NUM_ARGS_IMPL( _0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,     \
                                    _12,_13,_14,_15,_16,__N,...)      __N
#endif

#ifndef __PLOOC_VA_NUM_ARGS
#define __PLOOC_VA_NUM_ARGS(...)                                                \
            __PLOOC_VA_NUM_ARGS_IMPL( 0,##__VA_ARGS__,16,15,14,13,12,11,10,9,   \
                                      8,7,6,5,4,3,2,1,0)
#endif

#define __dmb0()    __builtin_arm_dmb(0xF)
#define __dmb1(__N) __builtin_arm_dmb(__N)

#define __dmb(...)     __CONCAT(__dmb, __PLOOC_VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)
  1. please add macro protection for the following intrinsics: image

I have generated a cmsis-pack with the fixes mentioned above:

RaspberryPi.RP2xxx_DFP.0.9.5-dev.pack.zip

will-v-pi commented 6 months ago

Fixed with 2cf649c67f