Writing in program area with PIC32

General questions about Firewing...

Writing in program area with PIC32

Postby Coccoliso » Fri Aug 24, 2018 11:54 am

Hi at all,
someone tried to use the program area of PIC32 to store some data ?
I found an example in the FW32 loader but my ASM is very limited and I have problems with these functions:
Code: Select all
private inline function mips_intr_disable() as uinteger   
    // asm volatile ("di   %0" : "=r" (status))
    dim status as uinteger = 0
    asm
      di   %0 :  "=r" (status)
    end asm
    return status
end function

private inline sub mips_write_c0_register(reg as uinteger, sel as uinteger, value as uinteger)
   // asm  volatile ( "mtc0   %z0, $%1, %2 \n ehb" : : "r" ((unsigned int) (value)), "K" (reg), "K" (sel))
   asm
      mtc0   %z0 , $%1, %2 \n ehb : : "r"  ((unsigned int) (value)), "K" (reg), "K" (sel)
   end asm
end sub


I have many "undeclared (firs use in this function)" :(
In the generated assembler I find the ASM line as it should be but surely I did not understand how to define interface variables :roll:

.. or an alternative system to get the same result : disable the interrupts and then restore them to how they were before.
User avatar
Coccoliso
 
Posts: 169
Joined: Sat Sep 27, 2014 10:02 am

Return to Questions

Who is online

Users browsing this forum: No registered users and 1 guest

cron

x