Instruction Trap 0x83
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-05-03 9:38 AM
Hi.
I have a program in STM8L152R8, my firmware has a size of 0xEFE1.
I want to prevent that for any reason my microcontroller work bad. So, I want to fill the rest of the hex file (0x901E) with 0x83 (interrup trap).
in my programm I have the next code (main.c):
void vFill_Trap(void)
{ &sharpasm switch .textdcb.b 36894, $83 ; allocate trap bytes
; all initialized to $83&sharpendasm
}I need the main.c file be the last to compile.
How I can do this?
I use the STVD and Cosmic.
Thanks.
#trap-interrup-0x83-fill-hex- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-05-07 5:36 AM
I'm not sure what you are really trying to do but if you just want to specify the compile order, you can do that very simply. The order in which the source files are compiled is the order in which they appear in your ''workspace project'' folder. Follow the directions outlined in the STVD help manual in section 3.6 ''Ordering source files before assembly.'' Here is what it says:
- Add the source files to your project (
Project > Insert Files Into Project
) - Right-click on the project in the Workspace window and disable the
Add Sorted Elements
option in the project contextual menu. - Drag and drop the source files into the correct order. The first file to be assembled in at the top, the last is at the bottom.
- Right-click on the project in the Workspace window and reactivate the
Add Sorted Elements
option in the project contextual menu.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-05-13 1:26 AM
