What need to implement to run this code correctly on Raspberry pi 3 using bare metal code?

#include <stdlib.h>

int main(void)
 int size = 500*1024*1024;
 int pos = 200*1024*1024;
 unsigned char* p = malloc(size);
 p[pos] = 0xAA;
 unsigned char c = p[pos];

 while (1) ;
  • 2
    Hello. Do you mean you want to know how to write the equivalent code in assembler or how to get started with machine code and assembler? Have a look here: stackoverflow.com/questions/137038/… – Roger Jones Jun 24 at 15:27
  • I'm familiar with gcc. I'd need information abot which code should I use. For example MMU, etc... – jsmith Jun 25 at 8:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.