Add basic CMSIS core headers #384
No reviewers
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk!384
Loading…
Reference in a new issue
No description provided.
Delete branch "cmsis"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a new cmsis_core INTERFACE library, which provides the basic CMSIS macros/definitions, and RP2040.h and system_RP2040.h
By default the isr_ methods in the vector table are renamed to their CMSIS versions, but this can be overridden by defining PICO_CMSIS_RENAME_EXCEPTIONS=0
fixes #21
This depends on #382 for the exception/irq handler renaming
@ -0,0 +2,4 @@# at least if the vendor/device is RaspberryPi/RP2040...## PICO_CMAKE_CONFIG: PICO_CMSIS_PATH, directory to locate CMSIS installation, default="included stub CORE only impl", group=build#if (DEFINED PICO_CMSIS_PATH)It doesn't really matter, because this is all commented-out anyway, but should the
PICO_CMSIS_PATHvariables you've used here actually bePICO_CMSIS_CORE_PATHso that it matches up with the non-commented-out code below?@ -0,0 +7,4 @@#ifndef _CMSIS_RENAME_EXCEPTIONS_H#define _CMSIS_RENAME_EXCEPTIONS_H// PICO_CONFIG: PICO_CMSIS_RENAME_EXCEPTIONS, Whether to rename SDK exceptions such as isr_nmi to their CMSIS equivalent i.e. NMI_Handler, type=bool, default=0, group=cmsis_coreThis line says
default=0, but line 14 seems to set the default to 1? 😕@ -0,0 +7,4 @@/** Copyright (c) 2009-2018 Arm Limited. All rights reserved.** SPDX-License-Identifier: Apache-2.0If we're including Apache-licensed code into the SDK, do we need to mention something about this in our README.md ? 🤷 🤷
@ -0,0 +1,275 @@/******************************************************************************* @file mpu_armv7.h* @brief CMSIS MPU API for Armv7-M MPUWe probably don't need an Armv7-M header? 😉 Or does the CMSIS stuff fail to compile without it?
@ -0,0 +23,4 @@* See the License for the specific language governing permissions and* limitations under the License.** SPDX-License-Identifier: BSD-3-ClauseThis file has both:
Does that mean it's dual-licensed, and the user can pick which licence they use it under? If that is the case, perhaps it's worth adding a quick comment explaining that?
FYI I didn't review this previously, because it was marked as a Draft PR.
@ -0,0 +7,4 @@#ifndef _CMSIS_RENAME_EXCEPTIONS_H#define _CMSIS_RENAME_EXCEPTIONS_H// PICO_CONFIG: PICO_CMSIS_RENAME_EXCEPTIONS, Whether to rename SDK exceptions such as isr_nmi to their CMSIS equivalent i.e. NMI_Handler, type=bool, default=0, group=cmsis_coreplease open a PR
@ -0,0 +1,275 @@/******************************************************************************* @file mpu_armv7.h* @brief CMSIS MPU API for Armv7-M MPUit is a badly named file
ah, makes sense!
@ -0,0 +7,4 @@#ifndef _CMSIS_RENAME_EXCEPTIONS_H#define _CMSIS_RENAME_EXCEPTIONS_H// PICO_CONFIG: PICO_CMSIS_RENAME_EXCEPTIONS, Whether to rename SDK exceptions such as isr_nmi to their CMSIS equivalent i.e. NMI_Handler, type=bool, default=0, group=cmsis_coreWhat's the intended behaviour - change the PICO_CONFIG default to 1, or change the actual #define to 0 ?
@ -0,0 +7,4 @@#ifndef _CMSIS_RENAME_EXCEPTIONS_H#define _CMSIS_RENAME_EXCEPTIONS_H// PICO_CONFIG: PICO_CMSIS_RENAME_EXCEPTIONS, Whether to rename SDK exceptions such as isr_nmi to their CMSIS equivalent i.e. NMI_Handler, type=bool, default=0, group=cmsis_coreyeah the #define is correct i.e. 1
ping @ghollingworth for queries about the mixed-licensing.
LGTM
Graham,
We should add the CMSIS license to this LICENSE file and just list the path of files that are covered by it.
Gordon
@ghollingworth you are a day late and a dollar short. this is already merged/released. Also
What is this license? list the files where?
might be simplest to submit a PR.
I suspect Gordon might have been thinking something along the lines of https://github.com/raspberrypi/firmware/blob/master/README.md ? 🤷
EDIT: Or https://github.com/raspberrypi/rpi-eeprom/blob/master/LICENSE ? 🤷
No I was thinking along the lines of the debian copyright format:
https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
This allows something like the following: