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

c programming

RISC-V on EECS Dept Computers: Compiling and Simulating

In this blog post I’m going to go through the steps for setting up a program for simulating basic RISC-V processors on computers in York University’s EECS department. This should be helpful for undergraduate and graduate students, as well as faculty who want to use RISC-V in their research or courses. While we’ve been using […]

Spike Simulator for learning: C vs. Assembler

RISC-V processors, like ARM processors, are complex beasts, making them challenging to teach with. When teaching with them it’s important to have appropriate development tools to reflect the immediate pedagogical goals but also to provide students with a pathway for further learning and application. When I teach courses on computer architecture, like EECS 2021 at […]

Getting Started with RISC-V: Spike Simulator

The Spike simulator is a command-line application for RISC-V development. It allows for both 32-bit and 64-bit simulations and supports multiple variants of RISC-V types. It’s an alternative to using the Segger emSim simulator, which has both a graphical mode and a command line mode and. It’s also more up-to-date and widely-used than the RVS […]

CLion & LibSerialPort

I’ve been itching to kick the tires on the CLion IDE to see how it works as a contemporary C and C++ development environment. I’ve been using Jetbrain’s IntelliJ IDE ever since my student,Richard Robinson, recommended it to me for Java development. I typically write C programs using embedded IDEs like MCUXpresso, Segger Embedded Studio […]

MPLAB X on Apple Silicon

A lot of people have been asking whether Microchip’s MPLAB X runs on Apple Silicon machines. The answer is: Yes. I have just tested it out on my Apple M3 Pro MacBook Pro. It works fine so far. I have installed MPLAB X v6.20 and the XC8 compiler. I’ve hooked up a PIC16 board and […]

Testing the LEDs and Button 1 on the ChipKit I/O with KL25

As part of a research project I’m resurrecting some KL25Z boards and ChipKit basic I/O shield boards and seeing if they can be used together. The ChipKit has some pushbuttons and LEDs. The following code, with the help of single-stepping and the debugger can get the LED bank and BTN1 on the ChipKit I/O board […]

ChatGPT: “I’m sorry but I couldn’t find any information”

While chatbots like ChatGPT are truly ground-breaking, they have limitations. In fact, there are many cases in which chatbots simply cannot return an answer due to the limitations of the LLM structure and dataset. Experts quickly find the limitations of chatbots, but novices to a topic are very likely to get tripped up by the […]

Unit Testing a Question Bank

I’m working on question sets for introductory programming classes in languages like Java, C and Matlab, with a possibility of extending into other commonly-used languages (in our department) like Python and Verilog. The idea is that these questions could be deployed into a protected lab test or an open in-class “flipped homework” environment. Key to […]

Automated Student Evaluations in C (part 5)

This is the fifth in the series of postings on automated grading in C. Here, I’ve modified the VPL exercise to include four possible flowcharts that the students can implement, but the particular flowchart now get assigned to the student based on the time of day. The VPL output (both “run” and “evaluate” looks like […]

Automated Student Evaluations in C (part 4)

In this fourth post, I’m going to modify the way the unit tests in C get picked up by the VPL “run” and “evaluate” scripts so that rather than look for a particular phrase returned by the unit test (something like “The unit test expected to see 5 but the student’s function returned 1”), it’s […]