Skip to main content Skip to local navigation
Home » Category: 'assembler'

assembler

Exploring RISC-V Options: the RP2350 (Part 8 -- Returning a Single Array Value)

Here, we'll return the value from an array defined in the assembler file to the calling C function. When writing programs like this it's handy to refer to a "cheat sheet" like this one. If everything works as it should your serial monitor should have the following output: There are two files here: returnArrayValue.S and […]

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 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 […]

Exploring RISC-V Options: the RP2350 (Part 1)

In engineering education there is an ever-present problem with technology-anchored pedagogy: when do you switch from current technology to the next one? Right now, the cool kid on the block in the RISC-V architecture. Will it be the next ARM or will it be the next PowerPC or MIPS? It's hard to tell. However, a […]

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 […]

Floating Point Math Resources

For EECS 2021 students who are looking for additional resources on floating point math, here are some suggestions. Exercises with solutions: While we're at it, here is the Bit Fiddle app, by Tobias Stamm, a handy tool for converting between base 2, base 16 and base 10, as well as a twos-complement conversion page. Finally, […]

Writing a RISC-V Assembler file for Segger Embedded Studio

I like practical programming. That can be tough with assembler. But one of the important things to recognize is that you can limit the amount of support work that you have to do in assembler by embedding your assembler code in a C or C++ project. In this video I show how to And then […]