GP32 Mr.mirkos Sdk Replacement


Thank you so much, loki !

Now, I've just recompiled and made the library with your help.
As you mentioned, the solution is the template MCP files nanjungho made.

Do u use the 0.6.2 version?

BTW, I'll also check the SMC library tomorrow and let you know the result.
But, I can't fix it becuase I'm a beginner.. :eek:

Thanks,
- omega5 -
 
Hi,
if any of u use ADS and made wokring smfs lib please help

have u add "-DGP32" ads C compile option for smfs lib?

according to smfs 'Makefile' -DGP32 needs.

plz test this lib and gxe working.

smfs test

and welcome omega5,

- nanjungho

ps:
2004-03-04 오후 08:13 34,328 smctest_ads.fxe
2004-02-26 오전 12:06 49,768 smctest.fxe

ads version smaller then gcc version if b2fxec default compressed :)
 
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++;
}
 
cause its not working here???
what's wrong?

humm..
It seems crt0.S problem.
If u use early version of crt0.S then run properly.
I can't sure what's the main problem.
read the ads1.2 Online-Book doucument to solve this problems.

- nanjungho

Code:
; Startup code for ADS 1.2 by nanjungho
; User must set link option -first crt0.o(init)
;////////////////////////////////////////////////////////////////////////////@
;// crt0.S                                                                  /@
;////////////////////////////////////////////////////////////////////////////@
 AREA init, CODE, READONLY
 
 IMPORT |Image$$RO$$Base|; Base of ROM code
 IMPORT |Image$$RO$$Limit|; End of ROM code (=start of ROM data)
 IMPORT |Image$$RW$$Base|; Base of RAM to initialize
 IMPORT |Image$$RW$$Limit|; End of ROM code (=start of ROM data)
 IMPORT |Image$$ZI$$Base|; Base and limit of area
 IMPORT |Image$$ZI$$Limit|; to zero initialize
 IMPORT __rt_lib_init
 IMPORT gpmain
; HEADER
 
 ENTRY
 B  _START 
 DCD  |Image$$RO$$Base|; ?
 DCD  |Image$$RO$$Limit|; End of ROM code (=start of ROM data)
 DCD  |Image$$RW$$Base|; Base of RAM to initialize           
 DCD  |Image$$RW$$Limit|; ?                                   
 DCD  |Image$$ZI$$Base|; Base and limit of area              
 DCD  |Image$$ZI$$Limit|;
 DCD  0x44450011 
 DCD  0x44450011
 
_HEAPSTART  
 DCD  |Image$$ZI$$Limit| ; start of Heap area
_HEAPEND  
 DCD  0x0C700000  ; end of Heap area
_STACKSTART
 DCD  0x0C77FF00  ; same as geepee32(emulator)

_START
     ; Set up stdlib.
 LDR             r1,  _HEAPEND
 LDR             r0,  _HEAPSTART
 BL              __rt_lib_init
 
 LDR             r13, _STACKSTART; sp setup
  
 ldr             r3, =gpmain; C/C++ main Entry Function(do not rename to main)
 bx              r3
 
 END
 
Hi,

I also tested smctest_ads.fxe.
It just diplayed ERROR on LCD screen.

I think smctest_ads.fxe nanjungho uploaded might have correct crt0.S.

I don't know why it is nor working.

Thanks,
- omega5 -
 
Hi nanjungho,

I read your startup code carefully.

I think the latest startup code can support the memory allocation features via __rt_lib_init.

It is very usefule and great thing for me...

Now, I can forget the official SDK forever... :D

Thanks,
- omega5 -
 
Hi all,

Finally, I can excute the smfs example with ADS now... :lol:

If you change the code as below, you can get it.

<1> smf_conf.h

line 69,70
#define SM_COMPILER ARMC
#define SM_TARGET GP32_SM

These two lines were commented out in orginal code.


<2> smf_conf.c
line 131~133
unsigned long Date=11, Time=11, Tick;

//tm_get(&Date, &Time, &Tick);

=======================================
I think the root cause of this problem is
void smfsWaitUSec(unsigned long usec)

ADS 1.2 compiler seems to have a deep optimization of code.
So, this delay function was not working correctly.


Enjoy,
- omega5 -
 
loki666 posted on Mar 5 2004 at 08:45 AM said:
Code:
ldr             r3 at  =gpmain; C/C++ main Entry Function(do not rename to main)
why not rename to main???
If you use "main", ADS will use its own initialization code.

If we use "gpmain", ADS allow us to use our own heap initialization..
 
Last edited by a moderator:
great... gonna test this...
btw i managed to run the rtctest... you have to compile with ACPS enabled in the ASM Compiler Options
recompile common.a and rctest should work

maybe we could use the RTC for the smfWaitUSec()
 
I met a something strange thing with rtc_test.fxe.

I made a test code with ACPS option as loki's recommendaation.
But, it didn't work. rGlobalCount is alreay 0.

So, I tested RTC fuction with rtc_test.fxe Mirko built.
But, it also didn't work.

So, I thought my RTC block is broken.


I could recall RobertJ's MP3 player. As you know, it is written with Mirko's library.
My concern was if my RTC block is broken, GpMad32 might not work.
But, GpMad32 works fine.

More strange thing is after rebooting from GpMad32, my RTC test program
as well as Mirko's program are working well.

I think my BIOS is different from you guys.
I'm using Gamepark latest Korean bios.

Or, my SWI setup is wrong......

BTW, I'm very curious why .....

Please help me.... :unsure:


Thanks,
- omega5 -
 
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 -
 
Last edited by a moderator:
loki666 posted on Mar 5 2004 at 02:18 PM said:
im' using lastest beta euro firmware
and i was using the previous crt0.s (wich seems to me more compliant to ADS documentation)
Hi loki,

If you use the official beta firmware, we may have almost same condition.

Does it work well with your RTC test program just after power on ?

If so, please kindly post your FXE to test it.

Thanks,
- omega5 -
 
Last edited by a moderator:
I'm new to the whole "programming" thing beyond what they teach in school. Does it matter what C/C++ compiler you use? I have access to a linux compiler thru school, but I don't know what kind. The only reason I'm asking is because it looks like this package was made for newbs like me so I figured I'd dabble.
 
loki666 posted on Mar 5 2004 at 05:13 PM said:
here is my full project
rtctest
and it works well just after power on

thanx my smfs and rtc is working now with the old crt0.S
Hi loki,

Your rtctest.fxe works well just after power on. :rolleyes:

But, :(
Even I use old crt0.s, i still can't excute RTC.
I think we may have some differeces in common.a library.

Please kindly post your full project of common.a library.

Thanks,
- omega5 -
 
Last edited by a moderator:
Back
Top