mr.mirko posted on Mar 4 2004 at 02:26 PM said:
Hi, i think i should add macros for ads versions,
What else parts need a __ADS12__ macro ?
#include "gp32.h"
#ifdef __ADS12__
__irq static void RTCInt(void);
#else
void RTCInt(void) __attribute__ ((interrupt ("IRQ")));
#endif
volatile u32 rGLOBALCOUNTER;
#ifdef __ADS12__
__irq
#endif
static
void RTCInt(void) {
rGLOBALCOUNTER++;
}
Hi Mr.Mirko,
First of all, thank you very much for your SDK.
I think we have about 50:50 of GCC:ADS users.
If new version is released, all of ADS user have a problem or hard time to port it.
But, GCC users are so happy and have no complain.
I totally agree your idea for the macro i.e.,__ADS12__.
Interrupt routines are work well with above example.
Addtionally, I changed a lot, but I can't remember.
I can recall something as below....
1. (u32 *) casting is not allowed in ADS.
So, we just removed it.
- Mirko's code
(u32*) rIISPSR = prescale<<5;
- ADS code
rIISPSR = prescale<<5;
2. software loop based delay function
- period of the delay function is different from GCC version.
3. asm files.
- gp_arm.s, swi_install_irq.s, armdisirq.s, armenirq.s, ads_crt0.s
These 5 files are released by nanjungho.
I'm not sure whether we can use macro __ADS12__ or not.
I think it is impossible.
If I can recall more difference, I'll post . :rolleyes:
Thanks,
- omega5 -