Skip to main content Skip to local navigation
Home » Category: 'c programming'

c programming

Exploring RISC-V Options: the RP2350 (Part 7 -- C+ASM returning values)

Here I want to post an example of an assembler function that simple sends a value back to the C function that called it. The concept and approach are pretty general, but it is specifically aimed, via the assembler code for running on the RP2350 RISC-V system. Small changes would be needed for a PIC18, […]

Exploring RISC-V Options: the RP2350 (Part 6 -- Assembler Errors)

Writing assembler code is hard, for a few reasons. First, the lack of abstraction forces you to think about each and every step of your program. Second, the lack of abstraction requires you to know a great deal about the hardware. Then, the grammar is just weird. You might write it from left to right […]

Exploring RISC-V Options: the RP2350 (Part 5 -- Disk Not Ejected Properly)

This is going to be a short post. Over the past couple of days I've been exploring the RP2350 and the Arduino IDE as a possible tool for teaching computer architecture. In the morning I've been turning on my macOS machine and have been faced with this: What's causing the issue? I'm not sure. But […]

Exploring RISC-V Options: the RP2350 (Part 4 -- Serial Monitor Tooling)

It's easy to get caught in weird assembler errors. This is made more difficult if you don't have a background debugger and need to use a boot loader / serial monitor to debug your system. Sometimes that's all you have. So here is a suggestion for a C++ and Assembler file pair to check to […]

Exploring RISC-V Options: the RP2350 (Part 3 -- No Drive to Deploy)

It was bound to happen. The Seeed Studio RP2350 is not connecting to the Arduino IDE. I'll go out on a limb here and chalk this up to the boot loader having an issue after I tried to get it to spit out serial data or maybe it was because I was trying to get […]

Exploring RISC-V Options: the RP2350 (Part 2 -- Inline ASM)

Now, let's blink an LED using the Arduino IDE and the Xiao RP2350. I'm going to use a really handy YouTube video by Xeno Kovah: Arch1005: RISC-V Assembly 13 Writing Assembly 02 GCC Inline Assembly. This opens up the possibility of using "extended" assembler to allow for the passing of values between your C and […]

Zwei Blinkenlights

I'm doing some rapid "blinkenlights" prototypes for timer code today on the K32L2 board. The goal is to have two separate timers driving two LEDs using interrupt service routines. None of this code is optimized or ideal... I'm leveraging the NXP SDK and the examples that go with it for one Systick-driven LED and another […]

K32 Blinkenlights continued

Here we'll look at using the SysTick Timer to make the LEDs blink. The SysTick is a really basic timer found in ARM Cortex M0+ processors from all manufacturers. The SysTick will run an interrupt service routine that updates a global variable. That variable is used in the main loop to toggle the LEDs on […]

Blinkenlights on the K32L2

The K32 is another Cortex M0+ processor, similar to the ones that I've used in the past, like the KL25 and the K43. I'm using the K32 because it is supported, out of the box by the TinyUSB framework, which I want to leverage for MIDI music control. Typically, though, before we get started with […]

ESP32-C6: A RISC-V Microcontroller with JTAG on the USB

I'm more and more impressed by the selection of RISC-V processors out there. The ESP32 families of microcontrollers are found in some pretty impressive systems like M5Stack. The availability of WiFi and Bluetooth radios make them ideal development platforms for IoT. But here is a really cool thing. The ESP32-C6 RISC-V microcontroller has a single […]