CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Attempt to locate function with #org hangs compiler

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
laser_scientist



Joined: 26 Jun 2013
Posts: 7

View user's profile Send private message

Attempt to locate function with #org hangs compiler
PostPosted: Mon Sep 23, 2013 9:19 am     Reply with quote

Hello,

I am trying to locate a function stub at a specific location on a dsPIC33EP256MU806 and CCS compiler version 5.011. I have run into a number of issues, but now I am at the point where the program compiles if I comment out the #org statement on bios_stub_A, but the compiler hangs and I have to kill the compiler process if I put it back in:

Code:

#include <33EP256MU806.h>
#device ADC=8
#fuses HS,PR_PLL,NOWDT
#use delay(clock=96M)

#define CODE_BUFSTART 0x015600
#define CODE_BUFSEG2  0x020000
#define CODE_BUFEND   0x02ABFE
#define CODE_BIOSSTUB 0x0155F0
#define CODE_CHKSUM   0x0155FE
#define AUX_CODESTART 0x7FC000
#define AUX_CODEEND   0x7FFF00

#org AUX_CODESTART, AUX_CODEEND
void test_func();
#org default

void config_hardware()
{
   setup_oscillator(OSC_CRYSTAL, 96000000, 24000000);
}

void main()
{
   test_func();
   while (1);
}

void bios_func_A(void)
{
   config_hardware();
}

#org CODE_BIOSSTUB, CODE_CHKSUM - 2
void bios_stub_A()
{
   bios_func_A();
}

#rom CODE_CHKSUM={0xABCDEF}
#org CODE_BUFSTART, CODE_BUFSEG2 - 2 {}
#org CODE_BUFSEG2, CODE_BUFEND {}

#org AUX_CODESTART, AUX_CODEEND
void test_func()
{
   bios_stub_A();
}
#org default


Does anyone know what might be happening? Thanks in advance for any assistance.

Best regards,
Dan
Ttelmah



Joined: 11 Mar 2010
Posts: 19447

View user's profile Send private message

PostPosted: Mon Sep 23, 2013 11:16 am     Reply with quote

At least on older versions, CCS didn't allow you to put anything in the auxiliary memory. May still be the problem...

Best Wishes
jeremiah



Joined: 20 Jul 2010
Posts: 1337

View user's profile Send private message

PostPosted: Mon Sep 23, 2013 3:55 pm     Reply with quote

you would also need to use the default keyword in the starting #org (in addition to the ending #org)

I'm not sure if auxillary memory is supported yet.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group