You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
414 B

  1. /* simple app.
  2. modify test.ld to change address.
  3. Even if the app is position independent, the symbols
  4. need to match to test basic debugging.
  5. To load the app to 0x20000000 in GDB, use:
  6. load a.out
  7. monitor reg sp 0x20004000
  8. monitor reg pc 0x20002000
  9. stepi
  10. arm-elf-gcc -mthumb -mcpu = cortex-m3 -nostdlib -Ttest.ld test.c
  11. */
  12. int j;
  13. void _start()
  14. {
  15. int i;
  16. for (i = 0; i < 1000; i++)
  17. {
  18. j++;
  19. }
  20. }