Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Linker error for 8051 in Multisim

Status
Not open for further replies.

jamark1969

New Member
Hi all

I'm using arrays in the Multisim 8051 MCU facility in C code and it's throwing up 4 linker errors:
Error: : 0 psect "rbss" exceeds address limit: 08Ch > 080h
Error: : 0 psect "rdata" exceeds address limit: 08Ch > 080h
Error: : 0 psect "irdata" exceeds address limit: 08Ch > 080h
Error: : 0 psect "idata" exceeds address limit: 08Ch > 080h


I've attached my c code to this post.

Can anyone explain what this means, please?
 

Attachments

  • Calculator.c
    4.3 KB · Views: 406
What C compiler are you using... AND which processor.. It seems as if your linker isn't assigning the Idata and Rdata efficiently

idata is initialised data rdata is constants... What memory has the chip got... The 8051 ( original ) didn't have rom memory it was all external.. There wasn't much ram on the original either... Can you select a newer device.. ie the ATMEL AT89sxxx for example?
 
Thanks for the reply. It’s a generic 8051 in Multisim. You have the option of adding external ram. I added 64kb of external ram but it had the same linker errors.
 
The 8051 had 128 bytes of onboard memory... you have declared nearly 65 bytes and the stack WILL take some.. So I think the limit is reached.

Now to access external RAM on a 8051 requires a different pointer system XDATA.. you need to check the hitec information to see how THEY approach the system... See if there is a " absacc.h ".. I use SDCC compiler and do not have these issues.. The compiler sorts it out..

Keil do a free version and people fayre much better with that.. Keil 8051 Microcontroller Development Tools

As I said.. I have always used SDCC as its totally free... I can use it in VSM studio in protues... BUT.. It also comes with MCU8051IDE

MCU 8051 IDE download | SourceForge.net
 
I've now changed it to the 8052 and it's reduced the errors to 2:

Multisim - 04 April 2021, 19:45:13
-------------------------Building: Project: Calculator--------------------------
Note: -E compiler option was not present. This option has been added to the compiler build command temporarily.
Note: -O compiler option was not present. This option has been added to the compiler build command temporarily.
Compiler results: 0 - Errors, 0 - Warnings
Linking...
Error: : 0 psect "rbss" exceeds address limit: 08Ch > 080h
Error: : 0 psect "rdata" exceeds address limit: 08Ch > 080h
Linker results: 2 - Errors, 0 - Warnings
 
The rbss and rdata are near pointers... you may compile with a slightly bigger model.. namely static memory...

It would appear that these are register variables..

If the -Bs is specified in the command line Change it to -Bm this will change the near pointers to far... thus use the external memory..
 
Thanks for that.

I have the option of adding up to 64kB of external RAM to my MCU model but it's then working out how to change the storage from internal to external RAM. The box is the call out box when I right click the 8052 MCU.

1617642424057.png
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top