I am quite new to rasberry so maybe I am falling on some simple error. I want to run FreeRtos on a Raspberry Pi 2 Model B V1.1.

I have succesfully compiled the FreeRTOS port for Raspberry obtained from this link:


I get as a result five files: kernel.elf, kernel.img, kernel.list, kernel.map and kernel.syms.

I have copied these files to the boot partition of the sd card that runs the rasberry, overwriting the original kernel.img.

I have checked that the led works connecting it to the ground and 3.3v pins.

The demo is supposed, as long as I have understand, to activate pin 16, where I have set a led light. When I plug the board I cannot see the led lighting. Any idea about what I am doing wrong?

UPDATED: As suggested by Joan, the problem has been solved by using a later fork of the project:



The base code was written years ago before the Pi2 existed.

The code is trying to flash the activity LED which was connected to GPIO 16 on the very first Pis.

It won't work on a Pi2 or Pi3 as the GPIO peripheral base address has changed from 0x20000000 to 0x3F000000.

Edit your copy of Demo/Drivers/gpio.c and change

volatile BCM2835_GPIO_REGS * const pRegs = (BCM2835_GPIO_REGS *) (0x20200000);


volatile BCM2835_GPIO_REGS * const pRegs = (BCM2835_GPIO_REGS *) (0x3F200000);

That may work.

Remember that GPIO 16 is connected to pin 36 on the Pi2.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.