Click here to Skip to main content
15,569,696 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need some educated opinions...

I am attempting to "port" a code written to have direct access to hardware registers. It may be far more than I can chew, but....

My basic question
I am crosscompiling my C++ code on x86 hardware which obviously have no "direct registers of interest to me " , my code is to access such registers on the target remote arm hardware.

Is this something I should be able to compile and link on my x86 hardware ?

If I can do that successfully , will I have "problems" debugging the actual code on the target hardware ?

I am planning to "debug" first my code which does not actually use the target registers, but eventually I may have to check the registers itself.

What I have tried:

I have successfully cross-compiled the code, but have some strange linker error - looks as wrong #define.
Updated 20-Sep-21 6:00am
k5054 20-Sep-21 10:52am    
Please post the linker error.

1 solution

Debugging will depend a great deal on what the target system has and how you are debugging.
For example, if you are debugging on an RPi, then you should have a full suite of compilers/debuggers available to you and will be able to debug using the Rasberry Pi OS, debuggers, etc. In that case, you may need to copy the entire code base over to the remote system so that the debugger knows what the source code is.
If, on the other hand, you have some embedded device, you may be limited to what the supporting environment allows, and have to resort to "debugging" by printing out the register values.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900