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. =)
"Then you need to complain to whoever made that file --- it's broken. There is no SFR at that address."
Note that the original post said "custom 8051 processor". So maybe someone did something less clever, when designing their own chip in programmable logic. Maybe this poor processor designer have placed a sfr in the middle of normal data addresses, just to make life interesting for the compiler/linker.
Maybe this poor processor designer have placed a sfr in the middle of normal data addresses
They can't have, because whatever they placed there is not an SFR. It's a memory-mapped peripheral in a spectacularly poorly chosen place, but not an SFR.