test.c 241 B

1234567891011121314
  1. volatile char shared_buf[100] __attribute__((cregister("EXT_MEM")));
  2. int local_data;
  3. volatile register unsigned int __R31;
  4. int main()
  5. {
  6. for (;;)
  7. {
  8. while ((__R31 & 0x1) == 0);
  9. shared_buf[++local_data] = 1;
  10. }
  11. }