JN518x: any open source script for UART ISP flash programming?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

JN518x: any open source script for UART ISP flash programming?

1,393 Views
usaygo
Contributor III

Hello,

I'm looking for ISP programmer (via UART) script as an alternative of DK6Programmer. Is there any recommendation? It's okay if it's not supported JN518x fully, but close one. I'm thinking of using Raspberry PI or other UNIX like platform.

0 Kudos
Reply
3 Replies

1,085 Views
dmsherazi
Contributor IV

@Ricardo_Zamora any updates on the sources for DK6Programmer. I need to compile it on an OpenWrt based board so we can program the JN589 on board 

0 Kudos
Reply

1,064 Views
usaygo
Contributor III

Hello,

Unfortunately I did not get any resouces and finally I did it myself (sorry, it can't be disclosed as open source...). 

I put a memo when I analyze its protocol. The packet definition can be found from JN518x datasheet (tailing four bytes are CRC32 checksum).

>0000094E00A709AE19
4E(00): Unlock ISP
<0000094F00BE129F58
4F(00): Unlock ISP(Success)

>00000832214A0494
32(): Get Device Info
<000011330088888888CC0000148DDBB66D
33(0088888888CC000014): Get Device Info(00:success, 88888888:chip id, cc000014:version)

>0000194E01112233445566778811223344556677884B1703
4E(01112233445566778811223344556677): Unlock ISP(01: Start ISP, 1122...77:Key)
<0000094F00BE129F58
4F(00): Unlock ISP(00:Success)

>0000094C00953FCC9B
4C(00):Get Memory Info(00: FLASH)
<00001D4D00000000000000DE090000020000010F464C4153486EB50A40
4D(00/00/00000000/00DE0900/00020000/01/0F/464C415348): Get Memory Info
(00:Success, 00:FLASH, 00000000:Base Addr, 00DE0900:Length=613KB,
00020000:SectorSize=512B, 01:Type=FLASH, 0F: Acceess(RdWrErEa), 464C415348:"FLASH")

>0000094C01E238FC
4C(01):Get Memory Info(01:PSCT)
<001D4D000100000000E001000010000000010F50534543546601C9E0
4D(00/01/00000000/E0010000/10000000/01/0F):
Get Memory Info(00:Success, 01:PSECT, 00000000:Base Addr, E0010000:Length=270Byte,
10000000:SectorSize=16Byte, 01:Type=FLASH, 0F:Access(RdWrErEa), 5053454354:"PSECT")

>0000094C027B31ADB7
4C(02): Get Memory Info(02:pFlash)
<00001E4D000200000000E001000010000000010F70466C617368819D1306
4D(00/02/00000000/E0010000/10000000/01/0F/70466C617368):
Get Memory Info(00:Success, 02:pFlash, 00000000:Base Addr, E0010000:Length=0x1E0=270B,
10000000:SectorSize=0x10=16Byte, 01:Type=FLASH, 0F:Access(RdWrErEa), 70466C617368:"pFlash")

>0000094C030C369D21
4C(03): Get Memory Info(03:Config)
<00001E4D000300FC09000002000000020000010F436F6E666967050CBE71
4D(00/03/00FC0900/00020000/00020000/01/0F/436F6E666967):
Get Memory Info(00:Success, 03:Config, 00FC0900:Base Addr=0x09FC00, 00020000:Length=256B,
00020000:SectorSize=0x200=256B, 01:Type=FLASH, 0F:Access(RdWrErEa), 436F6E666967:"Config")

>0000094C0492520882
4C(04): Get Memory Info(04:EFUSE)
<00001D4D00040000000080000000020000000501454655534559F6AB8F
4D(00/04/00000000/80000000/02000000/05/01/4546555345):
Get Memory Info(00:Success, 04:EFUSE, 00000000:Base Addr, 80000000:Length=0x80=128B,
02000000:SectorSize=0x02=2B, 05:Type=EFUSE(OTP), 01:Access(Rd), 4546555345:"EFUSE")

>0000094C05E5553814
4C(05): Get Memory Info(05:ROM)
<00001B4D00050000000300000200010000000001524F4D9B850164
4D(00/05/00000003/00000200/01000000/00/01/524F4D):
Get Memory Info(00:Success, 05:ROM, 00000003:Base Addr=0x3000000, 00000200:Length=0x20000=128KB,
01000000:SectorSize=0x1=1B, 00:Type=ROM, 01:Access(Rd), 524F4D:"ROM")

>0000094C067C5C69AE
4C(06): Get Memory Info(06:RAM0)
<00001C4D0006000000040060010001000000020152414D30DD2ACC3D
4D(00/06/00000004/00600100/01000000/02/01/52414D30):
Get Memory Info(00:Success, 06:RAM0, 00000004:BaseAddr=0x4000000, 00600100:Length=0x16000=88KB,
01000000:SectorSize=0x1=1B, 02:Type=RAM, 01:Access(Rd), 52414D30:"RAM0")

>0000094C070B5B5938
4C(06): Get Memory Info(07:RAM1)
<00001C4D0007000002040000010001000000020152414D31F49C83CE
4D(00/07/00000204/00000100/01000000/02/01/52414D31):
Get Memory Info(00:Success, 07:RAM1, 00000204:BaseAddr=0x4200000, 00000100:Length=0x10000=64KB,
01000000:SectorSize=0x1=1B, 02:Type=RAM, 01:Access(Rd), 52414D31:"RAM1")

>0000094C089BE444A9
4C(08): Get Memory Info(08:RAM1)
<0000094DF2DF976EEA
4D(F2): Get Memory Info(F2:Memory out of range)

>00000A400301F2CFAF52
40(0301): Open Memory for Access(03:Config, 01:Mode=Rd)
<00000A410000AF27A630
41(0000): Open Memory for Access(00:Success, 00:Handle=0)

>00001246000060FC090004000000D43DEF81
46(00/00/60FC0900/04000000): Read Memory(00:Handle, 00:Mode(Always 0), 60FC0900:Addr=0x9FC60, 04000000:Len=4B)
<00000D47003D7D0080265317E5
47(00/3D7D0080): Read Memory(00:Success, 3D7D0080:Data)

>0000094A00C3656B1D
4A(00): Close Memory(00:Handle)
<0000094B00DA7E5A5C
4B(00): Close Memory(00:Success)

>00000A400201EBD49E13
40(0201): Open Memory for Access(02:pFlash, 01:Mode=Rd)
<00000A410000AF27A630
41(0000): Open Memory for Access(00:Success, 00:Handle=0)

>0000124600004000000008000000E34C330A
46(00/00/40000000/08000000): Read Memory(00:Handle, 00:Mode(Always 0), 40000000:Addr=0x00000040, 08000000:Len=8B)
<0000114700BCA1382601C51B005CA9FD52
47(00/BCA1382601C51B00): Read Memory(00:Success, BCA1382601C51B00:Data(Prduction MAC addr))

>0000094A00C3656B1D
4A(00): Close Memory(00:Handle)
<0000094B00DA7E5A5C
4B(00): Close Memory(00:Success)

>00000A40000F3E5AD196
40(000F): Open Memory for Access(00:FLASH, 0F:Mode=RdWrErEa)
<00000A410000AF27A630
41(0000): Open Memory for Access(00:Success, 00:Handle=0)

>0000124200000000000000420000CCA2F324
42(00/00/00000000/00420000): Erase Memory(00:Handle, 00:Mode(always 0), 00000000:Address=0x0, 00420000:Size=0x2400=97KB)
<000009430012A7D054
43(00): Erase Memory(00:Success)

>000012440000000000000042000024173967
44(00/00/00000000/00420000): Blank Check Memory(00:Handle, 00:Mode(always 0), 00000000:Address=0x0, 00420000:Size=0x2400=97KB)
<000009450044FD77D2
45(00): Blank Check Memory(00:Success)

>0002124800000000000000020000E05F01044901
000041020000552D00004502000047020000490200006C68FEFB02794498A8410000BB5928734B02000000000000000000004D0200004F02
0000A52B0000AD2B0000B52B0000BD2B0000C52B0000CD2B0000D52B0000DD2B0000E52B0000ED2B0000F52B0000FD2B0000052C00000D2C
0000152C00001D2C0000252C00002D2C0000352C00003D2C0000452C00004D2C0000552C00005D2C0000652C00006D2C0000752C00007D2C
0000852C00008D2C0000952C00009D2C0000A52C0000AD2C0000B52C0000BD2C0000C52C0000CD2C0000D52C0000DD2C0000E52C0000ED2C
00000000000000000000F52C0000FD2C0000052D00000D2D0000152D00001D2D0000252D00002D2D0000352D00003D2D0000452D00004D2D
00008441000000000004040000008441000000000204000000000400000418010000000002040000000072B607484FF03801016006480068
000003D0054909688D4600470448004770472002004004080040080800407901000038B54FF080430322C3F88022264B63B3264B1C6FD3F8
B05000F09EF9022814BF0023012304F07F04402C16D000221A421BD04FF08043D3F8083813B1274909688D461B4A4FF0E023C3F8082D194B
0BB101F004FDAFF30080FEE7174A2A40042A01D00022E3E70122E1E701F0F7FC134B07E003F10C049A685968186800F030F823460F4A9342
F4D3F9FF158D
48(00/00/00000000/00020000/...data...):
Write memory(00:Handle, 00:Mode(always 0), 00000000:addr=0x0, 00020000:length=0x200=512B, ...)
<0000094900E84838DE
49(00): Write memory(00:Success)

>000212480000000200000002000006E01C46596854F8080B00F033F823
460A4A9342F5D362B603F016F8FEE700BF000000000020014000000000D51B000004000200200100003801000048010000FEE7FEE7FEE7FE
E7FEE7FEE7FEE7FEE7FEE70000080800400023934209D210B450F8044B41F8044B04339342F8D310BC70477047002303E0002240F8042B04
338B42F9D37047FFFF80B584B000AF786043F22153FB6001227968074802F0ACFF0346FB60FB68002B01D0012300E0002318461037BD4680
BD1C00000480B584B000AF7860396043F22153FB607B68002B02D10D4802F016F83B68002B02D10B4802F010F83A687968094802F075FF03
46FB60FB68002B01D13B6801E04FF0FF3318461037BD4680BDF43700001C3800001800000480B584B000AF78607B68002B02D10A4801F0EE
FF7868FFF7ADFF0346002B02D10123FB6002E04FF0FF33FB60FB6818461037BD4680BD00BF4038000080B58EB000AFB9607B600346FB7313
46BB7343F221537B637B687B61BB68BB6100233B7700237B77FB7BBB770123FB77012387F82030BB7B87F82C30BB7B012B18D107F114033B
631C220021264802F05BFF254B244A1A61234B1B6907F124021146184601F09EFD03467B637B6B002B14D010E0BB7B022B01D17B6B2FE0BB
7B032B01D17B6B2AE0BB7B042B01D17B6B25E07B6B23E0154801F08CFF124B1B691349184601F0B8FD03467B637B6B002BF9292DD7
48(00/00/00020000/00020000/...data...):
Write memory(00:Handle, 00:Mode(always 0), 00020000:addr=0x200, 00020000:length=0x200=512B, ...)
<0000094900E84838DE
49(00): Write memory(00:Success)

...

>0001DA48000000400000C8010000616C5F6D616E616765722E633A31
303538203A207265616448616E646C6500FF73657269616C5F706F72745F756172742E633A313339203A2073657269616C436F6E66696700
000073657269616C5F706F72745F756172742E633A313430203A2073657269616C48616E646C6500FFFF73657269616C5F706F72745F7561
72742E633A323637203A2073657269616C48616E646C6500000073657269616C5F706F72745F756172742E633A323638203A206275666665
720073657269616C5F706F72745F756172742E633A323639203A206C656E6774680073657269616C5F706F72745F756172742E633A323831
203A2073657269616C48616E646C6500000073657269616C5F706F72745F756172742E633A323832203A206275666665720073657269616C
5F706F72745F756172742E633A323833203A206C656E67746800580200001400000028000000030000002A2A2A2061737365727420666169
6C6564203A20002A2A2A205F437379735F616C6C6F63206661696C65640A0072007700FFFFFF001BB700BB1001BB0000000000000000A841
000000800400000000000000000000000000BB1001BB0000000000000000C841000000800400000000000000000000000000FD4BA3FF
48(00/00/00400000/C8010000/...data...):
Write memory(00:Handle, 00:Mode(always 0), 00400000:addr=0x4000, 00020000:length=0x01C8=456B, ...)
<0000094900E84838DE
49(00): Write memory(00:Success)

>0000094A00C3656B1D
4A(00): Close Memory(00:Handle)
<0000094B00DA7E5A5C
4B(00): Close Memory(00:Success)

>00000814F3478169
14(): Reset
<0000091500FE462A86
15(00): Reset(00:Success)

 

1,380 Views
Ricardo_Zamora
NXP TechSupport
NXP TechSupport

Hello,

 

Unfortunately the source code of this tool isn't available.

 

I apologize for the inconveniences.

 

Regards,

Ricardo

0 Kudos
Reply