Pierrick
Posts: 1
Joined: Mon May 27, 2013 5:08 pm
Location: Grenoble (FR)
Contact: Website

Re: FreeRTOS Sucessfully Ported

Mon May 27, 2013 5:11 pm

tufty wrote:You need to FAT32 format the card, copy the various bits of GPU firmware on there, and then simply copy the kernel.img onto the card.
Sorry I'm new on this and I don't know where to find "the various bits of GPU firmware"
President of I-Grebot robotics association
http://www.igrebot.fr

Snigelson
Posts: 30
Joined: Tue Jul 02, 2013 8:10 am

Re: FreeRTOS Sucessfully Ported

Fri Jul 26, 2013 2:08 pm

Hi guys.

I have rewritten a lot of the interrupt functionality and sent a pull request.
timr wrote:Your EnableInterrupt() and DisableInterrupt() look like mine now! I modified them slightly to return -1 for invalid nIRQ
I think this is the only thing from this thread i forgot to implement. Next time though.

I also added a three functions to gpio.c to handle gpio interrupts. So now, for example, if you want to get an interrupt on a rising edge, just do something like this. Code not tested, just assumed correct.

Code: Select all

void Your_ISR(int nIRQ, void* param)
{
    [... code here ...]
    /* Acknowledge the interrupt */
    ClearGpioInterrupt(PIN_NUMBER);
}

void Start_Your_Interrupt()
{
    /* Enable detect for the pin */
    EnableGpioDetect(PIN_NUMBER,DETECT_RISING);
    /* Register the interrupt handler */
    RegisterInterrupt(BCM2835_IRQ_ID_GPIO_0,RecvUART_interrupt,NULL);
    /* Enable the UART interrupt */
    EnableInterrupt(BCM2835_IRQ_ID_GPIO_0);
}
Regards,
dpc06+t1wG0S/P6frt6iR6fQODFsMCPrXr0+vbVYLzghsro5BpyK61/qRyqLvIQ1

Snigelson
Posts: 30
Joined: Tue Jul 02, 2013 8:10 am

Re: FreeRTOS Sucessfully Ported

Tue Aug 06, 2013 7:25 am

Nobody wanna try this out? Looked like there was some interest in this, at least.
dpc06+t1wG0S/P6frt6iR6fQODFsMCPrXr0+vbVYLzghsro5BpyK61/qRyqLvIQ1

jaume.vila
Posts: 1
Joined: Mon Sep 09, 2013 7:57 am

Re: FreeRTOS Sucessfully Ported

Mon Sep 09, 2013 10:13 am

Hi,

i'm new with the raspberry pi.
I've succesfully build the freertos port, copied the kernel.* files to the SD card but nothing happens.
I'm not sure if i've copied the correct files or maybe i forgot something.

It's supposed to automatically execute de demo project? blink a led connected to the GPIO16?

Thanks in advance

fuffkin
Posts: 92
Joined: Thu Mar 07, 2013 10:50 pm
Location: United Kingdom
Contact: Website

Re: FreeRTOS Sucessfully Ported

Wed Sep 18, 2013 7:32 am

What's a typical boot time(s) for FreeRTOS and what could be the fastest time?
Sleepy Pi - Extend RPi battery life with a plugin Power Management & Arduino I/O board
http://www.spellfoundry.com

morger
Posts: 1
Joined: Fri Nov 08, 2013 10:45 am

Re: FreeRTOS Sucessfully Ported

Fri Nov 08, 2013 11:31 am

Hi all,

I'd like to use the Raspberry Pi's ethernet port with FreeRTOS. So what would I have to do to get a working ethernet port?

Thanks in advance

robu
Posts: 9
Joined: Sun Dec 02, 2012 7:26 pm

Re: FreeRTOS Sucessfully Ported

Sun Nov 17, 2013 5:53 pm

Hi, I am trying to write a driver for UART.

I am initializing the serial interface

Code: Select all

UARTDriver SerialInit(UARTConfig * pConfig)
{
	int i;
	unsigned long ra;
	DisableInterrupts();

	if (pConfig == NULL ) UDRV.config = &default_serial_config;
	else UDRV.config = pConfig;

	UART ->CR.REG = 0;

	ra = GPIO_REGS ->GPFSEL[1].REG;
	ra &= ~(7 << 12);
	ra |= 4 << 12;
	GPIO_REGS ->GPFSEL[1].REG = ra;

	GPIO_REGS ->GPPUD[0].REG = 0;

	for (i = 0; i < 150; i++)
		dummy(i);
	GPIO_REGS ->GPPUDCLK[0].REG = (3 << 14);
	for (i = 0; i < 150; i++)
		dummy(i);

	GPIO_REGS ->GPPUDCLK[0].REG = 0;

	UART ->ICR.REG = 0x7FF;

	//Setting the baud rate
	ra = (configUART_CLOCK << 2) / UDRV.config->baudrate;
	UART ->IBRD.REG = ra >> 6;
	UART ->FBRD.REG = ra & 0x3F;

	//UART ->LCRH.REG = 0x70;
	UART ->IMSC.REG = 0x0010;
	UART ->LCRH.REG = 0x70;
	UART ->IFLS.REG = 0x00;
	UART ->CR.REG = 0x301;

	RegisterInterrupt(BCM2835_IRQ_ID_UART, vUARTIrqHandler, NULL );
	EnableInterrupt(BCM2835_IRQ_ID_UART);
	EnableInterrupts();
	return UDRV;
}
And I am trying to catch the interruption

Code: Select all

static void vUARTIrqHandler(int nIRQ, void *pParam)
{
	if (UART ->MIS.BITS.BIT1)
	{
		SerialSendChar(SerialGetChar());
	}
	//SerialSendChar('I');
	//SerialSendChar('R');
	//SerialSendChar('Q');

	//Clear transmit interrupt
	//UART ->ICR.BITS.BIT5 = 0;
	//Clear receive interrupt
	//UART ->ICR.BITS.BIT6 = 0;

	//Lets acknowledge everything
	UART ->ICR.REG = 0x7FF;
}
I started the LED in a thread, so when I am pushing the button two times the LED stop flashing. Any thought what can be the problem?
The whole code can be found under the following git repository https://github.com/runguran/RaspberryPi ... rs/BCM2835
Robert

Arman10
Posts: 1
Joined: Mon Mar 10, 2014 6:58 am

Re: FreeRTOS Sucessfully Ported

Mon Mar 10, 2014 7:06 am

Hi All,

Fantastic!! I quite easily built and ran your demo.

How can I change demo project? somethings that can visually see.

Can I use different demo projects that is available on freertos.org?

Arman

GibbseyNZ
Posts: 2
Joined: Fri Mar 22, 2013 12:42 am

Re: FreeRTOS Sucessfully Ported

Mon Apr 07, 2014 10:04 pm

FreeRTOS running on the new raspberry pi compute module would make a great base for an open source PLC.
http://www.raspberrypi.org/raspberry-pi ... w-product/

jshintani
Posts: 1
Joined: Thu May 29, 2014 9:10 pm

Re: FreeRTOS Sucessfully Ported

Thu May 29, 2014 9:33 pm

Has anybody successfully gotten printf (stdio) to work?

I have followed a few tutorials and have compiled syscalls.c to an object file. But when I try and link the two together it blows up.

Can someone point me to a good tutorial or walk me trough it?

Greatly appreciated,
Jason

dpmjoshi
Posts: 1
Joined: Thu Jan 22, 2015 6:22 pm

Re: FreeRTOS Sucessfully Ported

Thu Jan 22, 2015 6:50 pm

Hi Everyone,

I am new to Raspbery Pi community,

I am trying to port FreeRTOS on PI by using your port and documentation.

But I am facing some problem while compiling the code,

after hitting make i get following errors

Dark Builder - Unified Build Environment
Version (1.0.0 - Armstrong)
arm-none-eabi-ld: cannot find -lgcc
arm-none-eabi-ld: cannot find -lgcc
arm-none-eabi-ld: cannot find -lce
make: *** [kernel.elf] Error 1

Can anyone please guide me regarding these errors,
Thanks in advance.

prabhakar_est
Posts: 2
Joined: Fri Jan 30, 2015 1:35 pm

Re: FreeRTOS Sucessfully Ported

Fri Jan 30, 2015 1:51 pm

Hi... Hello James

Firstly thanks for the effort.
I'm stuck. I'm able to build the port, and even load it to the SD card, but still no blinking LED. Could you venture a guess as to what I might be doing wrong?
==================================
root@ubuntu:/home/prabhakar/Downloads/RaspberryPi-FreeRTOS-master# sudo dd if=kernel.img of=/dev/sdb
100+1 records in
100+1 records out
51440 bytes (51 kB) copied, 0.0279959 s, 1.8 MB/s
==================================

After this point, I remove the SD card, stick it into the RPi, and plug in the micro-USB. I see the red (PWR) light come up, but nothing else happens.

prabhakar_est
Posts: 2
Joined: Fri Jan 30, 2015 1:35 pm

Re: FreeRTOS Sucessfully Ported

Fri Jan 30, 2015 2:17 pm

hi James,
root@ubuntu:/home/prabhakar/Downloads/RaspberryPi-FreeRTOS-master# sudo dd if=kernel.img of=/dev/sdb
100+1 records in
100+1 records out
51440 bytes (51 kB) copied, 0.0279959 s, 1.8 MB/s

after this i inserted the SD card in RPi B+, LED is not blinking.
i connected the LED to pin no.38(GPIO16).
not working, so can u help me in this???

by,
prabhakar

Avoncliff
Posts: 35
Joined: Fri Dec 09, 2011 5:24 pm

Re: FreeRTOS Sucessfully Ported

Sun Feb 01, 2015 10:48 am

Hi prabhakar
This was answered mar15th last year.
The raspberry has a slightly odd boot process in that the GPU boots first and then starts the ARM.
To produce a boot SD you need to format the card to FAT32 and install the bootcode.bin and start.elf files for the GPU, and then add your new kernel.img file.
The arm chip will then run the kernel.img file.
You can get the first two files from any current booting system.
David

Ckcompton
Posts: 1
Joined: Thu Apr 23, 2015 5:39 pm

Re: FreeRTOS Sucessfully Ported

Thu Apr 23, 2015 5:43 pm

I have the Rpi B+. How do you install FreeRTOS using a windows computer? Will the hdmi port work?

sree_yuvi
Posts: 4
Joined: Sun Jan 24, 2016 6:39 pm

Re: FreeRTOS Sucessfully Ported

Sun Jan 24, 2016 6:51 pm

Hi David, James,

1. Where can I get bootcode.bin and start.elf?. I have Rasbian OS binaries which contains these two files, can I just copy them?.
2. Do I need to copy cmdline.txt and config.txt present in the Raspian OS?.
3. In windows I simply COPIED bootcode.bin, start.elf, kernel.img to SD disk, is it good enough? I have properly formatted with FAT32. My question here is just copying good enough or something else I have to do?.
4. After powering on Raspberry Pi, In the monitor I am only getting colored screen, nothing else. Is it the right behavior?.

Please help me in clearing my doubts.

Thanks,
Sreekanth.

dwelch67
Posts: 835
Joined: Sat May 26, 2012 5:32 pm

Re: FreeRTOS Sucessfully Ported

Sun Jan 24, 2016 11:52 pm

Go to http://github.com/raspberrypi, you DO NOT need to download
the repo. Go to the firmware directory and then the boot directory.
For each of these files, bootcode.bin and start.elf (NOT kernel.img,
dont need it, too big)(loader.bin is no longer used/required). Click
on the file name, it will go to another page then click on View Raw and
it will let you download the file.

sree_yuvi
Posts: 4
Joined: Sun Jan 24, 2016 6:39 pm

Re: FreeRTOS Sucessfully Ported

Mon Jan 25, 2016 6:27 am

Thanks dwelch67.

I have copied bootcode.bin, start.elf from the link you have provided.
I have also copied kernel.img to SD card. when I power it on the device I can't see any log messages on monitor.
Does some log messages are displayed on monitor while loading bootcode.bin/start.elf/kernel.img? I see colored screen without any
activity.

Thanks.

sree_yuvi
Posts: 4
Joined: Sun Jan 24, 2016 6:39 pm

Re: FreeRTOS Sucessfully Ported

Mon Jan 25, 2016 2:27 pm

I am using RaspberryPi 2, and connected LED to GPIO16(pin-36), LED is not blinking.
Does same code work for RaspberryPi 2?.

Appreciate your help.

dwelch67
Posts: 835
Joined: Sat May 26, 2012 5:32 pm

Re: FreeRTOS Sucessfully Ported

Tue Jan 26, 2016 1:33 am

https://github.com/dwelch67/raspberrypi

try the blinker01/pi2 directory example copy blinker01.bin as your kernel7.img file and see if the leds blink, should just work.

if you have a uart connected up you can try the bootloader07/kernel7.img file as your kernel7.img file.

remember to sync and safely unmount your flash drive.

if these things dont work then as mentioned before by someone partition and format your sdcard as a FAT32, then copy these files over again

sree_yuvi
Posts: 4
Joined: Sun Jan 24, 2016 6:39 pm

Re: FreeRTOS Sucessfully Ported

Tue Jan 26, 2016 9:11 am

dwelch67, thanks for the reply.

In the original example what are all files we need to copy to SD card.
1. kernel.img
2. kernel.elf (required ??)
3. bootcode.bin
4. start.elf
5. cmdline.txt (required ??)
6. config.txt (required ??)

any other file?.

hellblessar
Posts: 1
Joined: Tue Oct 03, 2017 6:53 pm

Re: FreeRTOS Sucessfully Ported

Wed Oct 04, 2017 8:00 pm

Hello,
I would like to bump the problem with files on SD card. I've upload all required files and I just see colourful screen and no blinking LED. Do you have an file list what should be on the card to make FreeRTOS work properly?

Best regards,
Pawel

User avatar
fruitoftheloom
Posts: 14937
Joined: Tue Mar 25, 2014 12:40 pm
Location: Bognor Regis UK

Re: FreeRTOS Sucessfully Ported

Wed Oct 04, 2017 8:08 pm

hellblessar wrote:
Wed Oct 04, 2017 8:00 pm
Hello,
I would like to bump the problem with files on SD card. I've upload all required files and I just see colourful screen and no blinking LED. Do you have an file list what should be on the card to make FreeRTOS work properly?

Best regards,
Pawel

It appears you have resurrected a Post which predates the RPi 2B ? / 3B and Zero :shock:

It would appear that a newer community project to port FreeRTOS is here:

https://github.com/Forty-Tw0/RaspberryPi-FreeRTOS
My only "PC" is an Asus ChromeBit running ChromeOS, cloudcentric at its best !
Rockchip Quad-Core RK3288C SoC as used in ASUS Chromebook C201 & Chromebook Flip C100PA as well as the Tinker SBC

Return to “Bare metal”

Who is online

Users browsing this forum: No registered users and 6 guests