beagleboard / cloud9-examples

MIT License
52 stars 28 forks source link

gcc doesn't like __far in pru_cfg.h #55

Open WalterCEden opened 3 years ago

WalterCEden commented 3 years ago

I'm trying to run the PRU ADC c example at https://github.com/beagleboard/cloud9-examples/blob/master/PocketBeagle/TechLab/.challenges/analogIn.pru0.c

I'm running it with Cloud9's IDE and it's failing on the __far syntax in the pru_cfg.h file. Here's the specific line

volatile __far pruCfg CT_CFG attribute((cregister("PRU_CFG", near), peripheral));

Now I get a far type but this is __far so what's the problem and how do I fix this?

PierrickRauby commented 3 years ago

I think you need to use the pru C compiler to compile PRU codes and not GCC