View Full Version : Small version of mados?
thedogcow
09-05-2004, 01:59 PM
Hi i was wondering if anyone out there had made a smaller version of mados, perhaps without the test menu and some of the apps? Just wondering cos i wanna do this for an 8210. Otherwise, does anyone know the best way to go about achieving this?
hanzelko
10-05-2004, 11:46 AM
Hi there.
I have made it for Nokia 5110. It's easy. Just take whole MADos. And cut off what you don't need. I have taken the main.c and removed all menu stuff from it (So I my mados I don't have menu). So I took that main and added other HW stuff. I have take led.c, lcd.c, keyboard, sim, DSP. And from core I have taken memory management, IPC stuff and scheduler. Than I taken a look at the sources, Edit crt0_loader. Edited some bugs (for N5110 another memory map). Then I tried to compile it. I have edited compile.conf (There are written file which must be complied. So I removed the file that I don't need (Menu, test apps and so on). A compile was OK. And builded flash.elf and objdumped it to loader.fls -> 24652 bytes in size. I have uploaded it (via flasher so my build is MODEL_LOADER). I voile. It has worked (Some problem were there but I have fixed it. And it works). I have IRQs, tried DSP stuff and it works. For N5110 i had to modify keyborad layout. Because some keys were not working. But you can take that test part from main.c and there are test case for keyboard, IRQs (you see timer, And all IRQ, FIQ and their calling count). And it's working. And then when you got this. You can take what app you need and compile it with this.
So that's it.
GsmCyber
10-05-2004, 12:56 PM
can u attach that MADos flash here?! ;)
hanzelko
10-05-2004, 06:54 PM
Hi there.
I have uploaded here two versions (including source code).
mados_5110_min.zip (loader.fls = 24652 bytes)
mados_5110_DSP_MBUS.zip (loader.fls = 35716 bytes).
But the DSP_MBUS version is newer. I have added there source for DSP and MBUS. There is MDI also and 3 dsp blocks added.
But most important is that I have fixed there bug with stacks. Just do diff of that my two versions. It is in include/code/sched.h
:
unsigned char stack_buffers[THREAD_STACK_SIZE*SCHED_THREADS];
unsigned int sched_stacks[SCHED_THREADS] = {
// what the hack is this ????
// RAM get's rewritted by stack and we have exception
//0x00110000, 0x00111000, 0x00112000, 0x00113000,
//0x00114000, 0x00115000, 0x00116000, 0x00117000
(unsigned int)(stack_buffers+THREAD_STACK_SIZE),
(unsigned int)(stack_buffers+2*THREAD_STACK_SIZE),
(unsigned int)(stack_buffers+3*THREAD_STACK_SIZE),
(unsigned int)(stack_buffers+4*THREAD_STACK_SIZE),
(unsigned int)(stack_buffers+5*THREAD_STACK_SIZE),
(unsigned int)(stack_buffers+6*THREAD_STACK_SIZE),
(unsigned int)(stack_buffers+7*THREAD_STACK_SIZE),
(unsigned int)(stack_buffers+8*THREAD_STACK_SIZE)
};
#endif
So in that non DSP version, that bug is present (but it's working)
And in that DSP version i am using my own block for stack.
I don't know if this bug is already fixed in CVS. So I will check it.
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.