B4R Question problem in generating hex file when using rc522 lib

sagmill

Member
Hi guys,
I need your helps.
When I tried to compile my b4r program for generating hex file to using on micro8 I get this error:

B4X:
#Region Project Attributes
    #AutoFlushLogs: True
    #CheckArrayBounds: True
    #StackBufferSize: 300
#End Region

Sub Process_Globals
    Public Serial1 As Serial
    Dim lcd As LiquidCrystal
    Dim mif As MFRC522
    Dim bc As ByteConverter
End Sub

Private Sub AppStart

    Serial1.Initialize(9600)
    
    lcd.Initialize(3,255,4, Array As Byte(5, 6, 7,8))
    lcd.Begin(2,16)
    lcd.Clear
    lcd.Write("Start...")
    Delay(2000)
    lcd.Clear
    lcd.Write("HELLO")
        
    mif.Initialize(10,9,"mif_CardPresent") 'micro 8 pins for miso, mosi , ss ,sck: 12,11,10,13'
    mif.LogVersion
End Sub

Sub mif_CardPresent (UID() As Byte, CardType As Byte)
    If mif.IsMifare Then
        Dim id As String
        id=bc.HexFromBytes(UID)
        lcd.clear
        lcd.SetCursor(0,0)
        lcd.Write(id)
    End If
End Sub

Erorr:
resources released: true
DEBUG StatusLogger Appender Console stopped with status true
TRACE StatusLogger XmlConfiguration stopped 2 remaining Appenders.
TRACE StatusLogger XmlConfiguration cleaning Appenders from 2 LoggerConfigs.
DEBUG StatusLogger Stopped XmlConfiguration[location=jar:file:/C:/Program%20Files%20(x86)/Arduino/lib/pde.jar!/log4j2.xml] OK
DEBUG StatusLogger Stopped LoggerContext[name=af3868, org.apache.logging.log4j.core.LoggerContext@140477f] with status true

But if I Delete the commands that contain MFRC522 lib , Hex file is generated correctly and program works properly.
Is the MFRC522 library has problem?
Or my programing or compiling is wrong?
Thanks.
 

sagmill

Member
Thanks Erel
The error is now shown as follows:
1-jpg.102944
 

Attachments

  • 1.jpg
    1.jpg
    64.1 KB · Views: 522
Upvote 0

sagmill

Member
Please post as text, not screenshot.

thanks Erel your reply;
Note: I set the board type to Arduino NG and older when compiling

B4R Version: 3.50
Parsing code. (0.00s)
Building folders structure. (0.51s)
Compiling code. (0.03s)
Building project (0.94s)
Compiling & deploying Ino project (Arduino NG or older - COM7) Error
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: F:\test\Objects\bin/src.ino.elf section `.text' will not fit in region `text'
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: region `text' overflowed by 2554 bytes
collect2.exe: error: ld returned 1 exit status
exit status 1
 
Last edited:
Upvote 0

sagmill

Member
The code (including the libraries) is too large for this board. How much RAM does it have?
Hi, Dear Earl
I was impatiently waiting for your answer.

briefly I need the hex file of this program to write flash on atmega8A.
Admittedly the RAM of micro is less than the Arduino but similar programs for the MFRC22 module written with Bascom AVR.
In fact, if I can not do that (programming by B4R for Atmega8- Atmega16), I have to go back to Bascom AVR software, which is very difficult and time consuming.
 
Upvote 0
Top