Error l121 improper fixup

Проект на асемблере разбит на несколько файлов (по функциям). В процессе сборки возникает куча ошибок типа: *** ERROR L121: IMPROPER FIXUP MODULE: Initialization.obj (INITIALIZ) SEGMENT: INITIALIZ_ OFFSET: 0059H Я так понимаю что при сборке нескольких файлов они накладываются друг на друга. Если ...

Проект на асемблере разбит на несколько файлов (по функциям). В процессе сборки возникает куча ошибок типа:

*** ERROR L121: IMPROPER FIXUP

MODULE: Initialization.obj (INITIALIZ)

SEGMENT: INITIALIZ_

OFFSET: 0059H

Я так понимаю что при сборке нескольких файлов они накладываются друг на друга.

Если в опциях проекта в закладке Device поставить «Use extended linker (LX51) ….» то проект собирается и работает нормально, но во время симуляции на каждом шаге выскакивает окно дизасемблера (если закрыть то на следующем шаге все одно выскакивает).

В хелпе на Keil нашел

«QUESTION

Why does the 251 linker (L251) report «L121 Improper fixup error» in my STARTUP.A51 file?

ANSWER

Make sure that if you modify the startup file to set the STACK correctly. In the 80251, the stack pointer is a 16-bit value. If you are accustomed to using the 8051, it is easy to forget to initialize the upper byte. This means the upper byte never gets set which may cause this error message.»

Может кто знает как вручную выставить этот 16 битный стек (похоже что обычный (не расширеный) линкер устанавливает 8 битный стек)???

This discussion has been locked.

You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to solve this problem and how did I got into this problem
?

I have used Silabs F930 and Silabs IDE for projects, and Linker
gives me this error and it has to do something about the memory
mapping and space. How to dig into the source of this problem ?
Internet is full of instructions and examples but nothing is clear to
me what is happening and how this can be solved. This happens now
when code size had increased over a certain point. What kind of
settings I should change or command options to solve the problem
?
The error message comes in this form:
xxxx.obj
>> SEGMENT: ABSOLUTE OFFSET: 0023H

Program Size: data=20.0 xdata=0 code=2397
LINK/LOCATE RUN COMPLETE. 0 WARNING(S), 1 ERROR(S)
Download cancelled.

Linker BL51.EXE and Compiler C51.EXE

Compiler options are: DB OE BR INCDIR(C:SiLabsMCUInc) LC
ROM(Small)
Linker options are: RS(256) PL(68) PW(78) CO(7000)

Thanks.

  • Juha Heik

    I’m aware of previous cases like this:

    www.keil.com/…/

    » The improper fixup error occurs because his code is using more
    than 256 bytes of data. Overlaying data space reduces data space
    usage and corrects the bug.»

    What does the above mean in practise, 256 bytes of data !?!?

    «Tells me that this is either an assembler routine or that it is
    the vector for an interrupt service routine (because the segment is
    ABSOLUTE). «

    In my case it is Interrupt to UART0 which is causing this
    problem.

    » The offset of 0023H tells me that the problem happens at the
    interrupt vector location. The only thing that would cause this
    problem there is an AJMP to an ISR that is too far away.»

    Why this would happen in the first place, why there is a jump
    distance limitation ?

    «It you are using C, this problem should not occur.»

    I do not use assembler, I only use C.

    -Thx

  • Juha Heik

  • HansBernhard Broeker

    ROM(Small)

    That option would appear somewhat problematic, given you’re
    currently facing a problem where things are, apparently, too
    big.

Raisonance Extranet

A few days ago we update our old BN713 (XA/8051) to BN737(XA/8051) .
BN713 shuts down since we have Win XP .
It looks that BN737 runs stable but during compiling of my old XA projects I got some Errors .
These Errors will not come with the old BN717 .
Ok . the most of them are solved now .

But I need some help and info for the Error Message :
ERROR 121: IMPROPER FIXUP (ADDRESS OUT OF RANGE) ADDRESS: 140DB

I know the meaning of this error message but how can i find out where the problem is ?

Here is a part of the generated map File :

——— TranslatorMod-XA UT_SC
——— PROC-XA
——— ENDPROC-XA
——— EndModule-XA
——— TranslatorMod-XA GETCHAR
——— PROC-XA

***ERROR 121: IMPROPER FIXUP (ADDRESS OUT OF RANGE)
ADDRESS: 140DB
——— ENDPROC-XA
——— EndModule-XA
——— TranslatorMod-XA UNGETCHAR
——— PROC-XA
——— ENDPROC-XA
——— EndModule-XA

The trouble seems to be in the getchar function.
the getchar function calls the putchar one.

Did you define your one putchar in your project?

If it’s the case, it seems that yours is to far (in the map) from the getchar.

Yes , I write my own putchar() . so maybe this is a hint to the problem .

Now i try to fix it !

Thanks Stephane , this is the problem .

The putchar must be within the same 64k segment as the getchar() .
The Linker puts the getchar() and I think all the other Raisonance libary code at the end of my code .
So the raisonance libary code is in the 2nd 64 k segment ( from 10000H up ).

example(s) of my os.axa :

; 1st example , did not work ERROR 121: IMPROPER FIXUP (ADDRESS OUT OF RANGE) ADDRESS: 140DB

public ?putchar :
; here the putchar code
ret

; 2nd example , will be compiled without errors , but my code did not like putchar in the 2nd 64k segment 🙁

code at 012000H
public ?putchar :
; here the putchar code
ret

; 3rd example , will be compiled without errors , but I did not know if the getchar is used by other Raisonance Libs .
; and in some situation it crashes 🙁

public ?getchar : ; lib’s getchar will be overwritten
ret

public ?putchar :
; here the putchar code
ret

To be in a save situation I think there are two solutions ( and one question ) :

1. I put the raisonance Libs , especialy the getchar() into the first 64k Page.
Question : What is the best way to do that ?

2. I wrote my own getchar , whitch maybe ist the simplest and savest way .
If I will get no better answer I think I will do that .

Источник

Теги:  Proteus  MCS51

окрестности

Сообщение об ошибке

***ERROR L121:IMPROPER FIXUP
    MODULE:MAIN.OBJ(MIAN)
    SEGMENT:ABSOLUTE
    OFFSET:0023H

решение

Изменить ром к большому


Интеллектуальная рекомендация

указатель-события: нет; решить проблему сбоя клика

На работе сделал выпадающий список. Фон стрелки вниз добавляется к form-select :: after, но при нажатии стрелки событие раскрывающегося списка не может быть запущено. Так что добавьтеpointer-events: n…

Как идея соединяет MySQL?

1. Открытая идея 2. Справа есть база данных, щелкните 3. Нажмите » +» 4. Продолжайте нажимать 5. Выберите MySQL 6. Введите, где находится база данных, имя пользователя, пароль, тестовое соед…

CSRF и SSRF

Введение в уязвимости CSRF CSRF (подделка межсайтовых запросов, подделка межсайтовых запросов) относится к использованию недействительной идентификационной информации жертвы (файлы cookie, сеансы и т….

Разработка управления приложениями

Получить всю информацию о приложении PackageManager Android управляет пакетами приложений через PackageManager, и мы можем использовать его для получения информации о приложениях на текущем устройстве…

Вам также может понравиться

Анализ исходного кода пула потоков -jdk1.8

openjdk адрес загрузки http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/tags Логические шаги пула потоков, с которыми поставляется Java, — это, в основном, следующие шаги: Реализация псевдокода Отправить ис…

Используйте инструменты в макете XML:

В макете, если некоторые фиксированные значения атрибута не установлены, некоторое представление не будет видно, когда будет видна макет. Все, что мы можем увидеть эффект предварительного просмотра, к…

Войдите в JVM

1. Введение в JVM 1.1 Концепция JVM Введение в виртуальную машину: JVM (аббревиатура от Java Virtual Machine. Java Virtual Machine.), JVM — это настраиваемый компьютер, которого на самом деле не сущес…

пользователи Linux и группы пользователей

Пользователь категория Профиль пользователь Root (Root пользователя) Команда Советы Упорядочить #, имеет самую высокую задачу разрешения любого разрешения файла недействительно для корневого пользоват…

Котлин Базовый — класс и атрибуты

Давайте напишем простой JavaBean класса Student в Java, только с одним свойством, имя. Тот же класс в Котлин это: PUBLIC в Котлин является видимость по умолчанию, поэтому его можно опустить. Этот вид …

tags: MCS51  PROTEUS

surroundings

Error message

***ERROR L121:IMPROPER FIXUP
    MODULE:MAIN.OBJ(MIAN)
    SEGMENT:ABSOLUTE
    OFFSET:0023H

solution

Change ROM to LARGE


Intelligent Recommendation

VS compile link error (Error Link2005) solution

A static library file provided by another colleague of the company was used in a recent project. This static library file integrates two libraries of CUDA and OpenCL, which are used for graphics accel…

Variable optimization of C51 program optimization

1. BDATA area The following code accesses a specific bit of the status register, and compares the code for accessing a byte defined in the DATA section with the code for accessing the same bit-address…

More Recommendation

eclipse js error report solution

When using someone else’s project, I found that the js file reported an error when imported into eclipse. The solution is to turn off the js verification function of eclipse. Three steps: 1.Ecli…

Push to github report error solution

When pushing the code to the remote warehouse, the following error was reported: After consulting the information, it was because when the warehouse was created on github, the README file was also cre…

Spark bulkload error report and solution

demand Parse the data on HDFS and write it to Hbase in batches via hfile (multiple column writing is required) The key api for writing data: Special place: 1): Initially write hfile warning ⚠️: There …

Skip to main content

Forum for Electronics

Forum for Electronics

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.

  • Digital Design and Embedded Programming

  • Microcontrollers

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

improper fixup error in keil


  • Thread starter

    tu122221


  • Start date

    Sep 19, 2017

Status
Not open for further replies.

  • #1

Newbie level 2

Joined
Sep 19, 2017
Messages
2
Helped
0
Reputation

0

Reaction score
0
Trophy points
1
Activity points

62


to display 8×6 text character on dot matrix display i am using code memory to store fonts array in 4 different tables and calling them using pointer. here is the code for it…..


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#include <reg51.h>
#include <stdio.h>
unsigned char code table1[]={
 0x80,0x80,0x80,0x80,0x80,0x80, // SPACE
 0x80,0x80,0x5F,0x80,0x80,0x80, // !
 0x04,0x02,0x05,0x02,0x01,0x80, // "
 0x14,0x7F,0x14,0x7F,0x14,0x80, // # 
 0x26,0x49,0x7F,0x49,0x32,0x80,// $
 0x22,0x10,0x08,0x04,0x22,0x80,// %
 0x80,0x36,0x49,0x36,0x28,0x80,// &
 0x04,0x02,0x01,0x80,0x80,0x80,// '
 0x08,0x14,0x22,0x41,0x80,0x80,// (
 0x80,0x41,0x22,0x14,0x08,0x80,// )
 0x2A,0x1C,0x08,0x1C,0x2A,0x80,// *
 0x08,0x08,0x3E,0x08,0x08,0x80,// +
 0x80,0x58,0x38,0x80,0x80,0x80,// ,
 0x08,0x08,0x08,0x08,0x08,0x80,// -
 0x40,0x80,0x80,0x80,0x80,0x80,// .
 0x20,0x10,0x08,0x04,0x02,0x80}; // ;
 
 
unsigned char code table2[]={
 0x3E,0x41,0x41,0x41,0x3E,0x80,// 0  
 0x80,0x42,0x0FF,0x40,0x80,0x80,// 1 
 0x42,0x61,0x51,0x49,0x46,0x80,// 2 
 0x49,0x49,0x49,0x49,0x36,0x80,// 3
 0x07,0x08,0x08,0x08,0x77,0x80,// 4
 0x4F,0x49,0x49,0x49,0x39,0x80,// 5 
 0x3E,0x49,0x49,0x49,0x32,0x80,// 6
 0x41,0x21,0x11,0x09,0x07,0x80,// 7
 0x3E,0x49,0x49,0x49,0x3E,0x80,// 8
 0x06,0x09,0x09,0x09,0x7E,0x80,// 9
 0x80,0x80,0x22,0x80,0x80,0x80,// :
 0x80,0x40,0x32,0x80,0x80,0x80,// ;
 0x08,0x14,0x22,0x41,0x80,0x80,// <
 0x14,0x14,0x14,0x14,0x14,0x80,// =
 0x80,0x41,0x22,0x14,0x08,0x80,// >
 0x06,0x01,0x51,0x09,0x06,0x80}; // ?
 
unsigned char code table3[]={
 0x3E,0x4D,0x53,0x1D,0x1E,0x80,// @
 0x7C,0x12,0x11,0x12,0x7C,0x80,// A
 0x7F,0x49,0x49,0x49,0x36,0x80,// B
 0x3E,0x41,0x41,0x41,0x22,0x80,// C
 0x7F,0x41,0x41,0x22,0x1C,0x80,// D
 0x7F,0x49,0x49,0x49,0x41,0x80,// E
 0x7F,0x09,0x09,0x09,0x01,0x80,// F
 0x3E,0x41,0x49,0x49,0x7A,0x80,// G
 0x7F,0x08,0x08,0x08,0x7F,0x80,// H
 0x80,0x41,0x7F,0x41,0x80,0x80,// I
 0x20,0x40,0x41,0x3F,0x01,0x80,// J
 0x7F,0x08,0x14,0x22,0x41,0x80,// K
 0x7F,0x40,0x40,0x40,0x40,0x80,// L
 0x7F,0x02,0x0C,0x02,0x7F,0x80,// M
 0x7F,0x04,0x08,0x10,0x7F,0x80,// N
 0x3E,0x41,0x41,0x41,0x3E,0x80};// O
 
unsigned char code table4[]={
 0x7F,0x09,0x09,0x09,0x06,0x80,// P  
 0x3E,0x41,0x51,0x21,0x5E,0x80,// Q
 0x7F,0x09,0x19,0x29,0x46,0x80,// R
 0x46,0x49,0x49,0x49,0x31,0x80,// S 
 0x01,0x01,0x7F,0x01,0x01,0x80,// T
 0x3F,0x40,0x40,0x40,0x3F,0x80,// U
 0x1F,0x20,0x40,0x20,0x1F,0x80,// V
 0x3F,0x40,0x30,0x40,0x3F,0x80,// W
 0x63,0x14,0x08,0x14,0x63,0x80,// X
 0x07,0x08,0x70,0x08,0x07,0x80,// Y
 0x61,0x51,0x49,0x45,0x43,0x80,// Z
 0x7F,0x41,0x41,0x41,0x80,0x80,// [
 0x02,0x04,0x08,0x10,0x40,0x80,// ""
 0x80,0x41,0x41,0x41,0x7F,0x80,// ]
 0x04,0x02,0x01,0x02,0x04,0x80,// ^
 0x40,0x40,0x40,0x40,0x40,0x80}; //  _
 
unsigned char * table (unsigned char);
void displaycolumn(void);   
unsigned char count=0,j=0,a=0;
unsigned char decoder=0;
unsigned char *c,*d; 
unsigned char idata msg[]={"Hello world"};
void main(void)
 { 
    
   TMOD = (TMOD & 0x0F) | 0x32;
   TH0=0x00;
   TR0=1;
     
   // Write your code here
   
   do{a++;
     count++;
   }while(msg[a]!=0);
   a=0;
while(1);   } 
   
 
 unsigned char *table (unsigned char x)
{
if(x==2)
return table1;
 
else if(x==3)
return table2;
 
else if(x==4)
return table3;
 
else if(x==5)
return table4;
 
else 
return 0;
}
 
void timer0_ISR (void) interrupt 1 
 {
   if(decoder<12) decoder++;
   else decoder=0x00; 
      P2=0xFF & decoder;
 
if((msg[a]!=0)&&(a<count))
{
c=table((msg[a]&0xf0)>>4);
d=c+(6*(msg[a]&0x0f));
    displaycolumn();
    }}
  void displaycolumn(void)
 { 
  P0= *d++;  
    j++;
    if(j==6) {
       a++;
       j=0;
       }}

………….

this is it…. i am stuck with an error called .. ERROR L121: IMPROPER FIXUP..
please help..

Last edited by a moderator: Sep 19, 2017

  • #2

The exact place where the fixup error happens matters.

The posted code however compiles for me in Keil V7 without errors.

  • #3

Newbie level 2

Joined
Sep 19, 2017
Messages
2
Helped
0
Reputation

0

Reaction score
0
Trophy points
1
Activity points

62


now i figured out that the problem was in the compilers .dll files which got fixed after i reinstalled keil..anyway thanks…

Status
Not open for further replies.

Similar threads

  • Digital Design and Embedded Programming

  • Microcontrollers

  • This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.

Понравилась статья? Поделить с друзьями:
  • Error kubridge skprx is not installed
  • Error kubernetes cluster unreachable the server has asked for the client to provide credentials
  • Error linkageerror occurred while loading main class main
  • Error link2019 c
  • Error link 2019