Saturday, September 23rd 2017, 12:22am UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

potter68

Beginner

Date of registration: Dec 17th 2013

Posts: 1

1

Thursday, December 19th 2013, 11:14am

OS_Exception() not found in vector table

Hello,

I am using embOS CortexM GNU Trial V388f with Olimex STM32-P107 and Eclipse/Ubuntu 12.4. The CPU is an STM32F107 and the start project i use is STM32F103_STM32_SK.

The demo project is running and the LEDs are blinking. So, everything is fine and i started reading the UM01033 embOS CortexM GNU document that comes with the embOS package to get a deeper insight in embOS.

The document says in Chapter 6.8.1 OS_Exception ...:
"Ensure that the address of OS_Exception() is inserted in the vector table at the cor-
rect position. The vector tables which come with embOS are already setup and
should be used and modified for the application."

But, as i can see, all Interrupt Handlers in startup_stm32f10x_md.S point to the Default_Handler. Should not at least one single Handler point to OS_Exception()?

I have to say, that i am very new to ARM Cortex M controllers (and 32 bit controllers at all), so it might be a non embOS related question.

Thanks, potter

SEGGER - Til

Super Moderator

Date of registration: Nov 14th 2007

Posts: 254

2

Monday, January 6th 2014, 3:01pm

Hello,

OS_Exception() is the old name for the embOS handler, we use now the CMSIS name PendSV_Handler() instead.
The documentation is not up to date, thanks for the hint, we will correct it.

The first 16 vectors are the same for all Cortex M3.
Please find PendSV_Handler() below:

Extraction from startup_stm32f10x_md.S:

C/C++ Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
__Vectors:
	.word	__stack_end__
	.word	Reset_Handler
	.word	NMI_Handler
	.word	HardFault_Handler
	.word	MemManage_Handler
	.word	BusFault_Handler
	.word	UsageFault_Handler
	.word	0
	.word	0
	.word	0
	.word	0
	.word	SVC_Handler
	.word	DebugMon_Handler
	.word	0
	.word	PendSV_Handler
	.word	SysTick_Handler


	.weak	PendSV_Handler
	.thumb_set PendSV_Handler,Default_Handler


The handler function itself is declared as weak which means that the Default_Handler is used when no other PendSV_Handler function exists.
The embOS PendSV_Handler() is part of the embOS library and the linker will use that one.

Best regards,
Til