Author |
Message |
Topic: How to add code to specific location |
lozzik
Replies: 8
Views: 7507
|
Forum: General CCS C Discussion Posted: Fri Jul 30, 2010 1:36 am Subject: How to add code to specific location |
Hi
I solved my problem,
in case of anybody else needs something like that
#build(reset = 0x0400)
#ORG 0x0000,0x0006
void jump_to_boot_control()
{
#asm GOTO 0 ... |
Topic: How to add code to specific location |
lozzik
Replies: 8
Views: 7507
|
Forum: General CCS C Discussion Posted: Thu Jul 29, 2010 11:57 pm Subject: How to add code to specific location |
Thank you for your help (it was also free :P )
I will figure something out.
Best regards |
Topic: How to add code to specific location |
lozzik
Replies: 8
Views: 7507
|
Forum: General CCS C Discussion Posted: Thu Jul 29, 2010 12:20 pm Subject: How to add code to specific location |
The answer depends a bit on whether you are using interrupts?.
If not, then simply use #build, to put the 'reset' location at (say) 0x20. Then have a #ROM statement, containing the byto sequence yo ... |
Topic: How to add code to specific location |
lozzik
Replies: 8
Views: 7507
|
Forum: General CCS C Discussion Posted: Thu Jul 29, 2010 4:32 am Subject: How to add code to specific location |
And by the way,
0x400 is enough for my interupt code and its at (0x0142).
How am I going to use the #rom for adding code to address 0 ?
I want "goto 0x7C00" at address 0. |
Topic: How to add code to specific location |
lozzik
Replies: 8
Views: 7507
|
Forum: General CCS C Discussion Posted: Thu Jul 29, 2010 4:28 am Subject: How to add code to specific location |
Thank you for your quick answer.
I am using interrupts in my program.
Actually I have a custom bootloader.
I have the main at 0x400 ( #build(reset = 0x0400) ).
Bootloader code starts at 0x ... |
Topic: How to add code to specific location |
lozzik
Replies: 8
Views: 7507
|
Forum: General CCS C Discussion Posted: Thu Jul 29, 2010 3:28 am Subject: How to add code to specific location |
Hi All,
CCS generates lots of code before first line in main function.
How can I add code before all those initializing codes.
It is not too much code that I want to add, just a few asm codes ... |
Topic: my DS18B20 isn't sensitive SOLVED |
lozzik
Replies: 0
Views: 2781
|
Forum: General CCS C Discussion Posted: Tue Jan 22, 2008 9:13 am Subject: my DS18B20 isn't sensitive SOLVED |
Hi,
i am using DS18B20 to measure temperature, but the result isn't sensitive i mean at 22 C my circuit shows 003,0 or 003,5 C when i heat the sensor the temperature increases but still further bel ... |
Topic: Cant write asm in correct adress |
lozzik
Replies: 9
Views: 11070
|
Forum: General CCS C Discussion Posted: Sat Nov 04, 2006 1:28 am Subject: Cant write asm in correct adress |
@Ttelmah
Thank you again for your replys |
Topic: Cant write asm in correct adress |
lozzik
Replies: 9
Views: 11070
|
Forum: General CCS C Discussion Posted: Fri Nov 03, 2006 9:51 am Subject: Cant write asm in correct adress |
here is the reply from ccs support
do you now using the #rom directive
1. Use #BUILD( reset=xxxx ) to put the compilers jump to
main at some new place in memory (like 0x100).
2. Create a f ... |
Topic: Cant write asm in correct adress |
lozzik
Replies: 9
Views: 11070
|
Forum: General CCS C Discussion Posted: Fri Nov 03, 2006 9:41 am Subject: Cant write asm in correct adress |
Thank you for your repleys.
This code is much easier than the first.
I have written this one. But i have still the same problem. I cant understand how this can happen code works sometimes and somtim ... |
Topic: Cant write asm in correct adress |
lozzik
Replies: 9
Views: 11070
|
Forum: General CCS C Discussion Posted: Fri Nov 03, 2006 8:40 am Subject: Cant write asm in correct adress |
here is my code
#include <18f4620.h>
#fuses intrc,NOWDT,PROTECT,NOLVP,NOBROWNOUT,NOMCLR,NOPBADEN
#build(reset=0x00020)
#org 0,0x10 {}
#use delay(clock=4000000)
... |
Topic: Cant write asm in correct adress |
lozzik
Replies: 9
Views: 11070
|
Forum: General CCS C Discussion Posted: Fri Nov 03, 2006 4:10 am Subject: Cant write asm in correct adress |
Hi,
i am using the PCWH 3,249
in my project there is some codes that have to be executet at startup before anything others. So i am writing it in the first letter in main function. But CCS generate ... |
|