Saturday, March 12, 2011

Running code on the GA330

Check out usbtool here:

http://github.com/iggarpe/cc1800

The CC1800 has 16KB of SRAM located at 0x0010000, and also mapped at 0x00000000 if certain bit of a special register is set. At boot time this bit is clear and ROM is mapped at 0x00000000.

The A330 can be made to boot from SD card by pressing DOWN during power up. In this mode the ROM code will load sectors 2-17 into SRAM at address 0x00100000 and execute. The code in rom.bin will then in turn execute the USB boot code, and from then on you can use the usbtool above to upload and execute your code through USB. Much more convenient that moving an SD card around.

Note however that since the USB boot code is not executed from ROM but from SRAM, the same SRAM you will be uploading to (at least until the SDRAM controller has been initialized), some restrictions apply: the USB boot code code in rom.bin is loaded at 0x00100000, and first thing it seems to do is move itself to 0x00102000, that is, to the second half of the 16KB of available SRAM. This means you can use only the first 8KB for your code AND the stack.

33 comments:

  1. So, how is development for the Gemei X760+ going.
    Should I give it up, and buy a Gemei A330 or a Dingoo a320?

    ReplyDelete
  2. Dingoo a320 stop your production.

    ReplyDelete
  3. Yeah im still waiting on news of the x760+ may as well give up now.

    Not buying that 330 tho not a chance doesnt look impressive at all.

    ReplyDelete
  4. Why do you guys keep at Gemei X760+? Seriously! I left mine on a drawer long ago and bought an A320!

    ReplyDelete
  5. So, if I write a small bootloader code, write to sectors 2-17 of the SD, the A330 will execute it? I'm thinking about using the serial port included in the chip so I can get some output in my bricked A330. Also I accidentaly broke the display connector while dissabling my 330, so even if the unbricking works I still have no display. Do you think it is possible to get at least the connector specification so I can order a replacement?

    ReplyDelete
  6. @danielr3

    Yes. Write any code you want and place it in sectors 2-17. It will be loaded into the internal SRAM at 0x00100000 and executed (if you keep pressed the DOWN key while powering on).

    If you mean the connector soldered on the PCB, I guess any 40 pin 0.5mm pitch FPC connector should do, for example this one: Omron X2FM-4015-1A (Farnell code 1112562).

    I happen to have several of these left from a project. Email me your address and I'll send you one.

    ReplyDelete
  7. @booboo an off question about gemei a330.
    Can some software active tv-out to see pictures on the tv???
    (and i try to plug an external hard disk with external energy and plug it into gemei and dont work :(, gemei starts to reload your energy by the hard disk X_X)

    ReplyDelete
  8. Sorry booboo but i want to buy some e-book video player and i found the gemei gm2000, so that's my question. Should be pocible to port dingux in a touch screem system?

    ReplyDelete
  9. Booboo there's something new on the Dingux for GA330 ...?
    How is the process, Gemei are no longer helping?
    Do you have any predictions?
    Good Luck

    ReplyDelete
  10. Neno... Booting process is not the only thing that is needed to port Dingux into Gemei A330. Read all blog and then You will get know that Booboo is still working on Dingux port for GA330 but he doesn't have for this too much time. We have to wait patiently !

    ReplyDelete
  11. I know it's a difficult job, I was just wondering if there are news ...
    Of course, if things are not so significant not deserve a new post ...
    And I also asked about Gemei / China Chip if they really Dingux left side ...

    I'm sorry bewildered
    Just wondering if you have any new ...
    I know he is working to soon having the Dingux for GA330 ...
    and wish good luck to him
    (I'm only disappointed with the attitude of the producers of GEMEI to put aside something which is the basis of the success of its predecessor ...)

    ReplyDelete
  12. Cool :)... waiting for dingux for A330 :), good work

    ReplyDelete
  13. Neno-san, Dingux porting is a 2-step process. The first is writing the drivers that would actually allow the porting, one in which Mr. Booboo must do himself and with relatively pooie material. (He can not release the material.) The second part is actually porting Dingux using the drivers, this being the time when the others can help.

    - Ziggy Zigzagoon

    ReplyDelete
  14. I've suddenly become interested in this device as my girlfriend has decided she needs one I'd be happy to help with development but realise that there would be a lot knowledge discovered so far that hasn't been documented or released. There are lots of people with the skills to do the work maybe they need a place to start so releasing the current documentation on processor would be a good beginning

    ReplyDelete
  15. @Tim

    I can't release that information since I got it under NDA, but I'll be happy to ask CC.

    ReplyDelete
  16. @booboo if the dingux be finished in gemei a330, should he have compatibility with the dingux mods for the dingoo a320? or a software that give the suports for the ports of a320 to the gemei a330?

    ReplyDelete
  17. I understand that yoiu, Booboo, got some info 'bout the processor from China Chip (CC) which may be needed to boot an operating system or firmware (say Linux) from an external source (say SD card)?

    I understand that they are smart enough to do that under a Non Disclosure Agreement (NDA). So it seems that the manufacturers are at least interested in community support for the Gemei A330.

    I do not understand why you did succeed in porting Linux with the Dingoo A320 and not w/ this one... Is it too difficult, or have you not enough information to do it? Forgive me for asking but a lot of people are sooooo looking forward to ports of all things Dingux to the Gemei.

    In any way: the best of luck with it! :)

    ReplyDelete
  18. Anton said...
    we want dingux on a330! :)
    Все так говорят...(с)
    Trouble mistake on board CC-1800 is really stopped Dingux on Gemei a-330 ?

    ReplyDelete
  19. if "memtest 0" don't show any activity that's mean boot mode not work?

    ReplyDelete
  20. @Fludboy

    Sorry, you'll have to either elaborate or reword. I don't know what you mean.

    ReplyDelete
  21. Sorry booboo don't want waste your time, maybe i just use wrong usbtool version

    ReplyDelete
  22. There is some progress on getting a native framework going over on Dingunity. Its looking good.

    ReplyDelete
  23. Anyone knows where I can buy the LCD for gemei A330 or the model of the LCD?

    ReplyDelete
  24. @perrodingoo

    Giantplus GPM940B0 according to the schematic.

    ReplyDelete
  25. booboo- Thank You very much! I was helping to one guy, he broke his ga330 lcd. Now the problem is: where can he buy this LCD?
    Muchas gracias, BOOBOO! Soy admirador de sus trabajos del desarrollo de Dingoo Linux aka Dingux ;)
    Le deseo exitos en todo!!!

    ReplyDelete
  26. So if I understand this correctly:
    The SD Card with the rom.bin will execute the USB boot loader, which is in the SRAM of the device.
    Questions:
    1. What if the USB boot loader on the device gets corrupted somehow?
    2a. Is there a way to run the same USB boot loader code (now corrupted in SRAM) from the original SD card?
    2b. If so, how would I get the bootload code from the SRAM of another device onto an SD card so I can connect the device to a computer to unbrick it?

    ReplyDelete
  27. @Hector

    You got something wrong or I don't explained myself correctly. The ROM IPL loads rom.bin from SD card, which happens to be an USB bootloader. From there on you can use the bootloader to upload and execute code in RAM, with the only caution of not writing over the USB boot loader code itself.

    Every time you power up the USB boot loader will be read from the SD card. It cannot get corrupted unless you somehow write to the SD card.

    ReplyDelete
  28. @Hector

    Email me directly and I'll try to help. But the procedure I described is quite simple and foolproof...

    ReplyDelete
  29. Do you know if the Dingux apps of Dingoo a320 will run on the Dingux of Gemei a330?

    I'm thinking about buying the Gemei a330, just because of the better hardware and the possibility of a dingux port for it, but it seems like there will be none in the near future (I know it isn't booboo's fault).

    Btw booboo, keep up the great work :)

    ReplyDelete
  30. @Raphael

    Now way. Different CPU, different hardware, different everything.

    Plus please note that ChinaChip is neither sponsoring a dingux port to the GA330 nor allowing me to release the info they provided (I've tried countless times), so don't expect dingux on the GA330 anytime soon.

    ReplyDelete