Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

FreeRTOS on Advantech PCM-3356 (IA32 mode i686 processor)

Posted by dave-the-rave on March 2, 2016

I am using an Advantech PCM-3356, which has an AMD i686 processor. Currently, I can compile FreeRTOS using gcc under Linux and get grub to load it onto the 686. I still need to set up the timer interrupt, integrate the scheduler with the tick, etc. (This is the IA32 mode of operation.)

Is there any way I could get a copy of the Board Support Package (BSP) for this board?

The Advantech in question is a current production industrial ruggedized PC clone, and runs Linux Mint 17.2 with no problem. Any BSP which supports IA32 mode on a standard PC-type computer should work.


FreeRTOS on Advantech PCM-3356 (IA32 mode i686 processor)

Posted by rtel on March 2, 2016

I presume this is the port you are using: http://www.freertos.org/RTOSIntelQuarkGalileoGCC.html - that should set up the timer interrupt and integrate the scheduler with the tick for you.

What are you looking for in the BSP? (what needs to be supported?)


FreeRTOS on Advantech PCM-3356 (IA32 mode i686 processor)

Posted by dave-the-rave on March 2, 2016

I am using that port, or at least parts of it. Specifically:

BaseTypet xPortInstallInterruptHandler( ISRHandlert pxHandler, uint32t ulVectorNumber );

The problem is that I can get swi to work just fine, but cannot get an IRQ 5 to fire. The IRQ 5 is connected to an old-fashioned PC/104 bus and appears on the 8259 input pins (or their virtual equlvalent).

Three questions: Is this thing using the PIC, the APIC, or something else? I am using grub as the bootloader, which puts the cpu into flat IA32-bit mode, but which requires that I call the routine which does asm("lidt") before any interrupt service routine will run. Is this going to cause some kind of problem? Do I have to change the interrupt vector location? If so, how do I do that?


FreeRTOS on Advantech PCM-3356 (IA32 mode i686 processor)

Posted by rtel on March 2, 2016

That demo is using the APIC (predominantly at least, I think there are some interrupts routed via the legacy PIC used in the demo app).

The demo also uses grub - I think there is a pdf linked from the documentation page that gives more detail. With regards to setting up the APIC and IDT, see https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Source/portable/GCC/IA32_flat/port.c - the tables are set up before the scheduler is started, you can search for the lidt instruction being used.


FreeRTOS on Advantech PCM-3356 (IA32 mode i686 processor)

Posted by dave-the-rave on March 2, 2016

I have read most of this, including the port.c. My question is, where does it put the vectors for the legacy interrupts (com1, com2, lpt1, etc?) I suspect that if I was to be sure about where exactly to put the vector, that would be half the problem solved.

I notice that, after grub has finished and after calling the port.c init stuff, the PIC registers contain non-zero mask bits, which implies that the PIC is being used. True?


FreeRTOS on Advantech PCM-3356 (IA32 mode i686 processor)

Posted by rtel on March 3, 2016

I'm afraid I don't know much about grub, but presume how it leaves the CPU will depend on your grub build or configuration.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner