Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
No goto in program memory.. [solved]
#1
Question 
Hi,

I am using Mplabx 1.51 with Hi-tech c 9.83. My device is a PIC16F1827.
I have put the code offset in the linker options.

My problem is that there is no goto 0x007f40 at address 0 in program memory view.


Does anyone know how to fix this?


Any help will be appreciated.
Reply
#2
Hi,
For what reason have you set a code offset?
Reply
#3
(2013-05-01, 19:25:10)Mikael Gustavsson Wrote: Hi,
For what reason have you set a code offset?

Well for some reason I have just realized that the bootloader is at the end of the memory.I have just removed the code offset option. Now the Goto is located at address 0X01 as shown below:

[Image: 20130501133928.png]
Reply
#4
(2013-05-01, 19:41:20)portafreak Wrote:
(2013-05-01, 19:25:10)Mikael Gustavsson Wrote: Hi,
For what reason have you set a code offset?

Well for some reason I have just realized that the bootloader is at the end of the memory.I have just removed the code offset option. Now the Goto is located at address 0X01 as shown below:

[Image: 20130501133928.png]

I got it working by setting the OSCON bit in user_code:

; Set internal oscillator to 4MHz (1101)
banksel OSCCON
bsf OSCCON, IRCF3 ;1
bsf OSCCON, IRCF2 ;1
bcf OSCCON, IRCF1 ;0
bsf OSCCON, IRCF0 ;1

bsf OSCCON, SCS1 ;1 System Clock Select bits
bcf OSCCON, SCS0 ;0
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)