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

Direct reg access

Hi again.
I have a custom 8051 processor which has defined a series of sfr, such as "sfr id_custom = 0x32" in the header reg51.h file.
When I tried to access from C, throws the error "Error 146: Invalid Base Address".
As I can do to disable this protection? or enabling the access to these registers?
Thanks.

PS: Sorry about my english. =)

Parents
  • Semantics (My Opinion)

    However since the compiler will assume in is RAM you will have to reserve all of them so the compiler does not use them as RAM. This may make the compiler unhappy when it tries to setup the RAM and stack. You may have some issues with the small memory model.

    ASM allows you to work around more things. Compilers have expectations.

    A Look at how chip makers solved the same issue may help if it is your chip.

Reply
  • Semantics (My Opinion)

    However since the compiler will assume in is RAM you will have to reserve all of them so the compiler does not use them as RAM. This may make the compiler unhappy when it tries to setup the RAM and stack. You may have some issues with the small memory model.

    ASM allows you to work around more things. Compilers have expectations.

    A Look at how chip makers solved the same issue may help if it is your chip.

Children