View previous topic :: View next topic |
Author |
Message |
richi-d
Joined: 28 Aug 2007 Posts: 106
|
|
Posted: Thu Mar 22, 2012 7:13 am |
|
|
Hi,
yes 0x00D0 to 0x400 works.
I will change it to 0x3FF but this doesn´t fix my problem... |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1345
|
|
Posted: Thu Mar 22, 2012 10:29 am |
|
|
Earlier you reported that it was putting code in the IVT. The #ORG should fix that. Is it still putting code there?
Is there anyway you can get your problem to show up in a smaller version of the code? Start with just a main that prints out stuff and see if that runs? If it does, try adding an interrupt and see if that runs. Then whereever it breaks, post that up? |
|
|
richi-d
Joined: 28 Aug 2007 Posts: 106
|
|
Posted: Tue Mar 27, 2012 5:00 am |
|
|
Hello,
it is putting code in earlier adresses than 0x00D0. The code it puts here are subroutines from the I2C. You can see the program memory some threads above. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19496
|
|
Posted: Tue Mar 27, 2012 6:37 am |
|
|
That is the difference, between '#ORG', and '#ORG default'.
The former relocates 'your' code, but leaves the compiler generated routines (time delays, serial, I2C etc.) in the normal locations. The latter tells the compiler to move these as well.
Best Wishes |
|
|
richi-d
Joined: 28 Aug 2007 Posts: 106
|
|
Posted: Fri Mar 30, 2012 6:27 am |
|
|
Hi,
the #org default doesn´t change anything. The I2C subroutines are between the IVT relocation adresses as before...
What else can I try? Is the Position of this order wrong? |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1345
|
|
Posted: Fri Mar 30, 2012 6:31 am |
|
|
Show us the code with the #ORG you used around the I2C call? I've had no trouble out of it using with rs232 routines and they are generated the same way.
Also post the code that actually uses the I2C routines and it's #ORG code |
|
|
richi-d
Joined: 28 Aug 2007 Posts: 106
|
|
Posted: Mon May 07, 2012 3:21 am |
|
|
Now again, I have problems with this Shi***y compiler, I made some software changes- program doesn´t run anymore. I purchased a copiler update for 275€, but program is still not running. I have no idea why!!!
This are my definitions, and found out that not all roms I defined here are correct.
Code: |
#include <24FJ192GA108.h>
#device adc=10
#device *=16
#BUILD (interrupt=0x408) //In diesem Bereich sind jetzt die Pointer für die Interrupts
//IVT Mapping to application code space
#ROM 0x04 = {0x04 *2 + 0x0400}
#ROM 0x05 = {0x00}
#ROM 0x06 = {0x06 *2 + 0x0400}
#ROM 0x07 = {0x00}
#ROM 0x08 = {0x08 *2 + 0x0400}
#ROM 0x09 = {0x00}
#ROM 0x0A = {0x0A *2 + 0x0400}
#ROM 0x0B = {0x00}
#ROM 0x0C = {0x0C *2 + 0x0400}
#ROM 0x0D = {0x00}
#ROM 0x0E = {0x0E *2 + 0x0400}
#ROM 0x0F = {0x00}
#ROM 0x10 = {0x10 *2 + 0x0400}
#ROM 0x11 = {0x00}
#ROM 0x12 = {0x12 *2 + 0x0400}
#ROM 0x13 = {0x00}
#ROM 0x2E = {0x2E *2 + 0x0400}
#ROM 0x2F = {0x00}
#ROM 0x38 = {0x38 *2 + 0x0400}
#ROM 0x39 = {0x00}
#ROM 0x9A = {0x9A *2 + 0x0400}
#ROM 0x9B = {0x00}
#ROM 0xAE = {0xAE *2 + 0x0400}
#ROM 0xAF = {0x00}
#ROM 0x14 = {0x14 *2 + 0x0400}
#ROM 0x15 = {0x00}
#ROM 0x3C = {0x3C *2 + 0x0400}
#ROM 0x3D = {0x00}
#ROM 0x4E = {0x4E *2 + 0x0400}
#ROM 0x4F = {0x00}
#ROM 0x7E = {0x7E *2 + 0x0400}
#ROM 0x7F = {0x00}
#ROM 0x80 = {0x80 *2 + 0x0400}
#ROM 0x81 = {0x00}
#ROM 0x36 = {0x36 *2 + 0x0400}
#ROM 0x37 = {0x00}
#ROM 0x34 = {0x34 *2 + 0x0400}
#ROM 0x35 = {0x00}
#ROM 0x78 = {0x78 *2 + 0x0400}
#ROM 0x79 = {0x00}
#ROM 0x76 = {0x76 *2 + 0x0400}
#ROM 0x77 = {0x00}
#ROM 0xBE = {0xBE *2 + 0x0400}
#ROM 0xBF = {0x00}
#ROM 0xBC = {0xBC *2 + 0x0400}
#ROM 0xBD = {0x00}
#ROM 0x16 = {0x16 *2 + 0x0400}
#ROM 0x17 = {0x00}
#ROM 0x1E = {0x1E *2 + 0x0400}
#ROM 0x1F = {0x00}
#ROM 0x5E = {0x5E *2 + 0x0400}
#ROM 0x5F = {0x00}
#ROM 0x60 = {0x60 *2 + 0x0400}
#ROM 0x61 = {0x00}
#ROM 0x62 = {0x62 *2 + 0x0400}
#ROM 0x63 = {0x00}
#ROM 0x64 = {0x64 *2 + 0x0400}
#ROM 0x65 = {0x00}
#ROM 0x40 = {0x40 *2 + 0x0400}
#ROM 0x41 = {0x00}
#ROM 0x42 = {0x42 *2 + 0x0400}
#ROM 0x43 = {0x00}
#ROM 0xCE = {0xCE *2 + 0x0400}
#ROM 0xCF = {0x00}
#ROM 0x3A = {0x3A *2 + 0x0400}
#ROM 0x3B = {0x00}
#ROM 0xA4 = {0xA4 *2 + 0x0400}
#ROM 0xA5 = {0x00}
#ROM 0x18 = {0x18 *2 + 0x0400}
#ROM 0x19 = {0x00}
#ROM 0x20 = {0x20 *2 + 0x0400}
#ROM 0x21 = {0x00}
#ROM 0x46 = {0x46 *2 + 0x0400}
#ROM 0x47 = {0x00}
#ROM 0x48 = {0x48 *2 + 0x0400}
#ROM 0x49 = {0x00}
#ROM 0x66 = {0x66 *2 + 0x0400}
#ROM 0x67 = {0x00}
#ROM 0x68 = {0x68 *2 + 0x0400}
#ROM 0x69 = {0x00}
#ROM 0x6A = {0x6A *2 + 0x0400}
#ROM 0x6B = {0x00}
#ROM 0x6C = {0x6C *2 + 0x0400}
#ROM 0x6D = {0x00}
#ROM 0xCC = {0xCC *2 + 0x0400}
#ROM 0xCD = {0x00}
#ROM 0x6E = {0x6E *2 + 0x0400}
#ROM 0x6F = {0x00}
#ROM 0x90 = {0x90 *2 + 0x0400}
#ROM 0x91 = {0x00}
#ROM 0x26 = {0x26 *2 + 0x0400}
#ROM 0x27 = {0x00}
#ROM 0x28 = {0x28 *2 + 0x0400}
#ROM 0x29 = {0x00}
#ROM 0x54 = {0x54 *2 + 0x0400}
#ROM 0x55 = {0x00}
#ROM 0x56 = {0x56 *2 + 0x0400}
#ROM 0x57 = {0x00}
#ROM 0xC8 = {0xC8 *2 + 0x0400}
#ROM 0xC9 = {0x00}
#ROM 0xCA = {0xCA *2 + 0x0400}
#ROM 0xCB = {0x00}
#ROM 0x1A = {0x1A *2 + 0x0400}
#ROM 0x1B = {0x00}
#ROM 0x22 = {0x22 *2 + 0x0400}
#ROM 0x23 = {0x00}
#ROM 0x24 = {0x24 *2 + 0x0400}
#ROM 0x25 = {0x00}
#ROM 0x4A = {0x4A *2 + 0x0400}
#ROM 0x4B = {0x00}
#ROM 0x4C = {0x4C *2 + 0x0400}
#ROM 0x4D = {0x00}
#ROM 0x96 = {0x96 *2 + 0x0400}
#ROM 0x97 = {0x00}
#ROM 0x2A = {0x2A *2 + 0x0400}
#ROM 0x2B = {0x00}
#ROM 0x2C = {0x2C *2 + 0x0400}
#ROM 0x2D = {0x00}
#ROM 0x98 = {0x98 *2 + 0x0400}
#ROM 0x99 = {0x00}
#ROM 0x50 = {0x50 *2 + 0x0400}
#ROM 0x51 = {0x00}
#ROM 0x52 = {0x52 *2 + 0x0400}
#ROM 0x53 = {0x00}
#ROM 0xB6 = {0xB6 *2 + 0x0400}
#ROM 0xB7 = {0x00}
#ROM 0xB8 = {0xB8 *2 + 0x0400}
#ROM 0xB9 = {0x00}
#ROM 0xBA = {0xBA *2 + 0x0400}
#ROM 0xBB = {0x00}
#ROM 0xC2 = {0xC2 *2 + 0x0400}
#ROM 0xC3 = {0x00}
#ROM 0xC4 = {0xC4 *2 + 0x0400}
#ROM 0xC5 = {0x00}
#ROM 0xC6 = {0xC6 *2 + 0x0400}
#ROM 0xC7 = {0x00}
#ORG 0x0D0,0x03FE {} //Hier sind die Hardware IVT´s darf nicht überschrieben werden.
#include <Main.h>
#include "Display_Steuerung.h"
#include "Display_Steuerung.c"
#include "Steuerung.h"
#include "Steuerung.c"
#include "Init.h"
#include "Init.c"
#include "SPI_EEPROM.h"
#include "SPI_EEPROM.c"
#include "Zeichensatz.h"
#include "Zeichensatz.c"
#include "IIC.h"
#include "IIC.c"
#include "Testprogramm.h"
#include "Testprogramm.c"
#include "Interrupts.h"
#include "Interrupts.c"
#build (reset=0x800) //Bleibt fix- nicht ändern wg. Bootloader Einsprung, Löschen für Standalone Programm
#ROM 0x00 = {0x040800} //Adressee 0 beschreiben wg. Dateiwandler
#ROM 0x01 = {0x000000} //Adressee 0 beschreiben wg. Dateiwandler
void main()
{
CLKDIV = 0x0000;
OSCTUN = 0; //Frequenz erhöhen 0-31, langsamer 63-31 min. 1 entspricht ca. 10ms |
I only expect that the compiler writes the Rom as I want- and not does what he wants!!
The problem is that I´m using this compiler since 8 years- a lot of software is written with it- else I would have changed to Microchip... |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Mon May 07, 2012 3:57 am |
|
|
I can see you are frustrated. Now what do you expect us to do? We are users just like you so we can't improve the compiler.
In order to help you:
- You should post your compiler version number (just saying you bought an update doesn't do it).
- You should post a complete program so we can compile it. And no, we don't want you to post the whole large program. Reduce your program to as small as possible and still showing your problem.
- Tell us exactly what your problem is. Right now I don't have a clue: 'program is still not running' is not very informative.
GIGO: Garbage In, Garbage Out
Is this related to the post in your other thread? http://www.ccsinfo.com/forum/viewtopic.php?t=48141
If yes, then please explain. |
|
|
richi-d
Joined: 28 Aug 2007 Posts: 106
|
|
Posted: Mon May 07, 2012 7:10 am |
|
|
Hello,
yes,
solved the problem. Sorry for bothering you guys, but this weekend was frustrating! |
|
|
|