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:

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
After deleting MFRC522 lib and related subs, the following error appears
but the hex file is created and executable:


 
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

 
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
Cookies are required to use this site. You must accept them to continue using the site. Learn more…