Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] section '.org_1' can not fit the absolute section. (16F628A)

Status
Not open for further replies.

ranga88

Newbie level 6
Joined
Oct 31, 2014
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
0
Hi,

I was trying to modify a downloaded .asm file originally written for 16F84A to work with 16F628A (it is for a scrolling text display 8x16 LEDs). I made few changes to the code and now I'm getting the following error while building the project. (when I delete the configuration line it builds successfully). I'm using MP Lab X IDE.
Please help. Thnx..

Error:

HTML:
Error - section '.org_1' can not fit the absolute section. Section '.org_1' start=0x00002007, length=0x00000002
Errors    : 1

make[2]: *** [dist/default/production/LED_scroll_text_8x16.X.production.hex] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
nbproject/Makefile-default.mk:112: recipe for target 'dist/default/production/LED_scroll_text_8x16.X.production.hex' failed
make[2]: Leaving directory 'C:/Users/*****/Documents/MPLab/LED_scroll_text_8x16.X'
nbproject/Makefile-default.mk:78: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/*****/Documents/MPLab/LED_scroll_text_8x16.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed

BUILD FAILED (exit value 2, total time: 1s)
 

hi 88,
Please post both of your asm files as attachments, I will run them thru MPLAB, see what I get.

E
 

Hello esp1,

Thanx for quick reply.

I have attached the .asm files below,
 

Attachments

  • LED_scroll_text_8x16(modified).txt
    6.8 KB · Views: 76
  • LED_scroll_text_8x16(original).txt
    6.5 KB · Views: 61

I have to say that is some of the most 'over written' code I have ever come across.

I can't run it through an assembler at the moment but I would guess the problem is right at the end. what happens if you comment out these two lines:
Code:
    ORG     2007h
    DATA	3FF1h

Brian.
 

You didn't tell what you want to achieve with the "modification" - did you consider it at all?

By adding the configuration line, you create conflicting data for the configuration words, the configuration has to be set by one or the other method.
 

I have to say that is some of the most 'over written' code I have ever come across.

I can't run it through an assembler at the moment but I would guess the problem is right at the end. what happens if you comment out these two lines:
Code:
    ORG     2007h
    DATA	3FF1h

Brian.

Yes, After turning the two lines into comments code compiled successfully. But doing so will it affect the expected results of the circuit? However, now I have completed the circuit and I will burn the hex to PIC and post the results.

Thanx for the help..:thumbsup:

- - - Updated - - -

You didn't tell what you want to achieve with the "modification" - did you consider it at all?

By adding the configuration line, you create conflicting data for the configuration words, the configuration has to be set by one or the other method.

I just needed to use a 16F628A chip instead of 16F84A. So I changed the RAM address, turned off comparators off and included the config line to make sure the LVP and CP are OFF and FOSC is set to XT. But I'm not sure whether that config line in needed or not there.

Thnx for the comment.:thumbsup:
 

Hi,

This builds ok, its basically the user memory location, see code for that and othe details.
The Oscillator is set for the internal 4mhz clock


Opps. your message #6 did not show up before I posted this.....
 

Attachments

  • EDA.zip
    2 KB · Views: 88

This builds ok, its basically the user memory location, see code for that and othe details.
Why did you copy the useless doubled configuration word?

Set the configuration either by the __CONFIG macro or the data statement, but not both.
 

Why did you copy the useless doubled configuration word?

Set the configuration either by the __CONFIG macro or the data statement, but not both.

Hi,

Don't understand, there is only one Config line in the code I posted and that is from the 628a .template file ?

All other original code that was changed was left in but commented out so the Op could easily see what changes I had made.
 

Code:
;	ORG	2007h
 	ORG 2100
	DATA	3FF1h
You moved the doubled configuration data to a non-existing address, but why didn't you simply delete it?
 

Code:
;	ORG	2007h
 	ORG 2100
	DATA	3FF1h
You moved the doubled configuration data to a non-existing address, but why didn't you simply delete it?


Yes , you are correct , an error on my part.:oops:
 

Actually - it isn't a non-existing address. Mplab(x) maps addresses from 0x2100 to EEPROM so it would compile without error but put the value in the first two bytes of EEPROM!

Brian.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top