Hi kwalter
Have an OLIMEX ARM-USB-OCD-H JTAG Flasher and OpenOCD as
JTAG software.
Can anyone give me a guide to flashing the K9F1G08U0D-SCB0 and the
to to give necessary firmware?
I can provide some info about writing with openocd.
Now I assume you already know how to connect your jtag interface to your dso and have at least
some familiarity with openocd.
If not, see post #2877 for a pinout, there are other earlier posts in the thread as well.
Below is the openocd config I used:
set CHIPNAME s3c2416
set CPUTAPID 0x07926f0f
source [find target/samsung_s3c2416.cfg]
adapter_khz 1000
adapter_nsrst_delay 100
jtag_ntrst_delay 100
reset_config trst_and_srst
scan_chain
nand device $_CHIPNAME.nand s3c2412 $_TARGETNAME
I have a dso5202p I think that's hw1.0 it has s3c2416 CPU, I do not know exactly what CPU
is on DSO-1062D, but I think you can locate that info in this thread as well.
So be advised you will have to slightly update your openocd config, rest of the steps are similar.
I used a jlink interface to connect to jtag you have to substitute olimex settings (see interface/arm-jtag-ew.cfg in openocd homedir)
The steps to restore using openocd:
I call open ocd like this:
openocd -f interface/jlink.cfg -f smdk.cfg -c init -c halt
I force init/halt from command line as I wasn't sure cpu was properly halted by settings in the config file.
telnet openocd console and try to probe nand flash model:
nand probe 0
if everything went fine it should detect your model and size.
NAND 128MiB 3.3V 8-bit (Samsung)
Here's an output from my openocd console:
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain connect_deassert_srst
TapName Enabled IdCode Expected IrLen IrCap IrMask
-- ------------------- -------- ---------- ---------- ----- ----- ------
0 s3c2416.cpu Y 0x00000000 0x07926f0f 4 0x01 0x0f
Info : No device selected, using first device.
Info : J-Link ARM V8 compiled May 27 2009 17:31:22
Info : Hardware version: 8.00
Info : VTarget = 2.154 V
Info : clock speed 1000 kHz
Info : JTAG tap: s3c2416.cpu tap/device found: 0x07926f0f (mfg: 0x787 (<unknown>), part: 0x7926, ver: 0x0)
Info : Embedded ICE version 6
Info : s3c2416.cpu: hardware has 2 breakpoint/watchpoint units
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x800000d3 pc: 0xc3e06ba4
MMU: enabled, D-Cache: disabled, I-Cache: enabled
Info : accepting 'telnet' connection on tcp/4444
NAND flash device 'NAND 128MiB 3.3V 8-bit (Samsung)' found
You will need a uboot partition image made previously with nanddump. I initially couldn't find my own image,
so I used an bin uboot image from an archive tinhead posted here sometime ago containing hantek sources files which
among other things contained some compiled code as well and luckily it worked.
The zip file is: DSO5000P.zip and the file is DSO5000P/src/uboot-2009.11/u-boot.bin
In case you need this file I can provide it but I have no idea if it will work for your DSO version.
Now to burn image:
nand erase 0
this is important as I couldn't get anything working until I erased nand flash before writing operation.
You could try to erase only the first few blocks but you have to compute the exact values and depends on your nand chip geometry.
next enable raw access in order to skip OOB writting.
nand raw_access 0 enable
finally, write the actual file:
nand write 0 uboot.bin 0
depending on your interface speed this can take some time but it should be done in a reasonable amount of time (half an hour or so).
If everything went fine you can now connect your serial and have uboot menu output.
I believe you know the drill from this further.
One piece of advice I can give you - keep in mind you cannot transfer the root image via usb bulk transfer (dnw) if image size exceeds the size of DSO's RAM.
My dso has 64M my root image was about 70M or so.
You could try to shrink root image to the size of the available memory, but it could be pretty difficult (it's an ubifs)
what I've done instead: as I had sdcard socket installed and busybox, ubitools, nandtools cross built on the sd card,
I forced a custom built kernel to boot and load busybox directly from sdcard.
Then I copied root image to sdcard and wrote it via ubiformat, you could try to use nandtools (flasherase/nandwrite) but I got it misaligned each time and ubi rootfs badly corrupted.