cancel
Showing results for 
Search instead for 
Did you mean: 

Howto use 'ORG' directive on STM8S?

e_zhui2
Associate II
Posted on January 11, 2011 at 03:41

Howto use 'ORG' directive on STM8S?

2 REPLIES 2
luca239955_stm1_st
Senior II
Posted on May 17, 2011 at 15:11

What's the ''org'' for? Just remove it, and if, as you say, you link that segment at 0x8080 you will end up with the code you require.

By the way, it looks like you want to jump at the beginning of the startup: the examples provided with the compiler show how to do that in C (reset vector)

e_zhui2
Associate II
Posted on May 17, 2011 at 15:11

We have a customiszed bootloader from 0x8000 ~ 0x807f, the main code is from 0x8080, and we don't use interrupt vector.

So we have to put a 'trampoline' instruction @ 8080.

Seems 'org' doesn't have the same effect like others.

A small (4 bytes) segment can wrap the jump instruction. It works.

Thanks...