Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

How do I access VTOR in the STM32F107 Rowley Port?

Posted by dibosco on July 3, 2014

Folks,

Am trying to use a stripped down version of the Rowley port of the STM32F107 demo to make a UDP bootlader. I therefore need to access the VTOR register. A search shows that misc.c has functions for changing the value of that register, but once it's included in the project it tells me it can't find corecm3.h. If I give the project access to that header, it then tells me that things like #define SCSBASE is redefined and gives errors such as:

static declaration of ‘__WFI’ follows non-static declaration

_WFI was previously defined in cortexm3macros.h

Does anyone know how I can get access to the VTOR register without all these errors please?

I should stress that I've been using this demo for a while now with no problems, it's just this issue of reloacting the vector table that's the problem!

Thanks. :~)


How do I access VTOR in the STM32F107 Rowley Port?

Posted by rtel on July 3, 2014

The VTOR register is always in the same place, so you can access it directly. For example, first define the address (you might want to check the actual address in case I have it wrong here):

~~~~

define VTOR ( * ( ( uint32_t * ) 0xE000ED08 ) )

~~~~

Then simply set it to point to whichever vector table you want:

~~~~ VTOR = [address]; ~~~~

Regards, Richard Barry.


How do I access VTOR in the STM32F107 Rowley Port?

Posted by dibosco on July 3, 2014

Fair enough! Thanks, Richard.


How do I access VTOR in the STM32F107 Rowley Port?

Posted by dibosco on July 7, 2014

Actually, this has not helped in the long term because I need to access all the flash registers and I'm getting the same errors when I include stm32f10x_flash.h

That file accress stm32f10x.h which in turn accesses core_cm3.h and then I get the same errors such as:

static declaration of ‘__WFI’ follows non-static declaration

_WFI was previously defined in cortexm3macros.h

So, I am still needing to know and understand what goes on with these headers and libraries and what I can do to resolve the issues. Why does this port not access corecm3.h, but does acceess cortexm3macros.h by the way?

Thanks!


How do I access VTOR in the STM32F107 Rowley Port?

Posted by rtel on July 7, 2014

Why does this port not access corecm3.h, but does acceess cortexm3macros.h by the way?

The port does not access either. As a general rule nothing in the FreeRTOS code, including the portable layer, relies on any third party code that is out of our control.

It might be that something in the demo application accesses these header files, and if so it will most likely be the start up code or peripheral drivers which may have originally come from ST.

Regards.


How do I access VTOR in the STM32F107 Rowley Port?

Posted by dibosco on July 7, 2014

Hmmm, there is a file called stm32f10x_conf.h and if I add this line:

"#define _FLASH"

Then it compiles. There are other similar lines that are there for the other peripherals that exist on this demo (!) (no malice or any snideness was intended in saying port rather than demo, was just a mistake/misunderstanding). I had to also add all the register bit definitions from another project - stuff like FLASHRDPRDP.

I guess/assume that because it's rare to access the flash registers as most programs perhaps don't need to reprogram on-chip memory, this was missed out of being defined in the stm32f10x_conf.h file.


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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists