We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

New RP2040 CMSIS Pack

Arm’s Common Microcontroller Software Interface Standard (CMSIS) initiative aims to standardise device support across many different vendors’ Cortex-M–based microcontrollers, and to provide simple software interfaces to the processor and its peripherals. Arm’s Windows-based µVision development environment uses CMSIS “pack” files to understand how to build and debug code on a given microcontroller.

To better integrate with the Arm ecosystem, we’re releasing a new CMSIS Device Family Pack (DFP) with support for Raspberry Pi Pico and Raspberry Pi Pico W. With this new DFP, you can now use these boards seamlessly with all of Arm’s CMSIS tools, including µVision. Our DFP includes the following:

  • header files, startup code, and other support files
  • software packages providing device-specific functionality
RP2040 front and back view

Instructions

To get started with the pack, download the latest version from GitHub. If you haven’t already installed µVision, follow Arm’s instructions here to install it. Then, follow the steps below to install the pack and run the examples:

  1. Open the µVision pack installer. Select File > Import, and import the pack you downloaded from GitHub.
  2. Click on the refresh button to refresh the page; the pack should now be installed.
  3. Click on Boards in the left hand window, and then search for Pico. Click on either Pico or Pico W, depending on which board you are using.
  4. Click Examples in the right hand window and select the copy action next the the Breath_LED example for your board:


  5. Select the folder you want to copy it into. Click OK to copy the example into the folder.
  6. Once the project loads, open main.c to view the code.
  7. If you’re using the Pico W example, set YourWifiSSID and YourWifiPassword to appropriate values for your WiFi network. Alternatively, delete these lines from the example if you don’t want to connect to WiFi:


  8. Click Build (F7) to build the project – don’t worry about the Warning: L6306W on Pico W.
  9. To use a Raspberry Pi Debug Probe for debugging, update your Debug Probe to the latest firmware. Then, select Project > Options for target ‘Pico’ > Debug, then set Use to CMSIS-DAP debugger and click OK.


  10. To run the code, click Start/Stop Debug Session (Ctrl+F5), then hit Run (F5).


  11. To view printouts from the device, select View > Serial Windows > Debug (printf) Viewer. This will receive printouts over the SWD interface, so there’s no need to connect UART to your Pico.

For more information on using µVision, please refer to the comprehensive User’s Guide provided by Arm.

7 comments

aBUGSworstnightmare avatar

How to check which firmware the debug probe is running? ‘usb-devices’ shows:
T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 6 Spd=12 MxCh= 0
D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=2e8a ProdID=000c Rev=02.01
S: Manufacturer=Raspberry Pi
S: Product=Debug Probe (CMSIS-DAP)
S: SerialNumber=
C: #Ifs= 3 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E: Ad=04(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=85(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I: If#= 1 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=00 Driver=cdc_acm
E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=16ms
I: If#= 2 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=83(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms

William Vinnicombe avatar

The bcdDevice (listed in your printout as Rev=) gives the version – so in your case it’s 2.01, which is the latest version

S Howard avatar

Nice! As someone that uses RP2040 for education, having this option is excellent for teaching ARM generally and the RP2040 as a specific instance of ARM.

Lachezar avatar

We also started developing our kits using the RP2040 for aerospace applications.

Rust support is amazing and the embedded community is slowly but steadily growing.

Philip Tranter avatar

Hello S Howard. I was intrigued to see that you are using RP2040 for teaching – I am about to move over from STM32 because of their divergence from standard CMSIS use/support. Now that the RP2040 CMSIS pack is available, I can use Keil/MDK (I think the complexities of Visual Studio approach would put students off). What approach are you using?

Ed Borasky avatar

Is there a way we can use CMSIS without needing to acquire a license for a proprietary software tool that only runs on Windows?

VisualLab avatar

Something like Keil µVision, only open source and for Linux, unfortunately does not exist. Creating such a tool is a huge amount of work even for a large team of programmers. If there was something similar, it would be wildly popular (I would use it myself). All that remains is using several different free applications, “cobbling them together” so that they work “more or less together”. But (of course) such work is very frustrating and incredibly time-consuming.

Comments are closed