Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: SourceForge.net <noreply@so...> - 2010-11-22 11:31:54
|
Bugs item #3115333, was opened at 2010-11-22 10:44 Message generated for change (Settings changed) made by tecodev You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3115333&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: pic16 target >Group: non bugs >Status: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: Stefan Olsson (stefanth) Assigned to: Nobody/Anonymous (nobody) Summary: sdcc is placing __interrupt function on wrong adress Initial Comment: Dear Sir or Madame which sdcc /usr/local/bin/sdcc sdcc -v SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 3.0.1 #6064 (Nov 22 2010) (Linux) gplink -v gplink-0.13.7 beta I have number of .C files targeting the PIC cpu 18f2520, the compilation goes well but the linking is failing with error message "multiple sections using address 0" The linker fails because it tries to place both the "ivec_0x0_isr " method and the "crt0i" on address 0x00000 according to the data blade of the PIC 18F2520 it is the reset vector (crt0i) that should be placed on address 0x0000 and the interrupt vector on 0x000008 (and in case high/low is used 0x000018 is low priority) My interrupt vector is declared like this void isr(void) __interrupt (0) this become this in the .lst file 00256 ;-------------------------------------------------------- 00257 ; interrupt vector 00258 ;-------------------------------------------------------- 00259 00260 ;-------------------------------------------------------- 00261 ; global & static initialisations 00262 ;-------------------------------------------------------- 00263 ; ; Starting pCode block for absolute section 00264 ; ;----------------------------------------- 00265 S_weatherlog_ivec_0x0_isr code 0X000000 0000 00266 ivec_0x0_isr: 0000 EF00 F000 00267 GOTO _isr the source file is compiled with sdcc -mpic16 -p18f2520 -V --debug --use-non-free -I/home/stefan/Project/Embedded/Pic/18F2520/WeatherLog/ -c weatherlog.c --opt-code-speed --optimize-cmp --optimize-df The project is linked with sdcc -mpic16 -p18f2520 -V --debug -Wl-c -Wl-m -I/home/stefan/Project/Embedded/Pic/18F2520/WeatherLog/ -oWeatherlog.hex BMP085.o DS1307.o I2CSWDriver.o OneWire.o SystemClock.o weatherlog.o --use-non-free --opt-code-speed --optimize-cmp --optimize-df Regards ---------------------------------------------------------------------- >Comment By: Raphael Neider (tecodev) Date: 2010-11-22 11:31 Message: > My interrupt vector is declared like this > void isr(void) __interrupt (0) ... and if you had used void isr(void) __interrupt(1) instead, all would be well. __interrupt(0) is used to denote the "RESET" handler, __interrupt(1) denotes the "common" / high priority interrupt handler, and __interrupt(2) denotes the low priority interrupt handler (SDCC Manual 4.6.15). Best regards Raphael ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3115333&group_id=599 |