Author Topic: EEVblog #1144 - Padauk Programmer Reverse Engineering  (Read 60612 times)

0 Members and 1 Guest are viewing this topic.

Offline ali_asadzadeh

  • Frequent Contributor
  • **
  • Posts: 867
  • Country: ir
    • ASiD Designer
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #600 on: July 25, 2019, 09:17:10 am »
Quote
open source hardware programmer: https://github.com/free-pdk/easy-pdk-programmer-hardware

I have checked it, it has only the hardware files, where is the software files for the STM32 MCU and also the PC side software
You can order parts from www.ASiDesigner.com
we are a wire-based company
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2259
  • Country: de
    • Frank Buss
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #601 on: July 25, 2019, 11:11:22 am »
Quote
open source hardware programmer: https://github.com/free-pdk/easy-pdk-programmer-hardware

I have checked it, it has only the hardware files, where is the software files for the STM32 MCU and also the PC side software
There is a message at the bottom of the page: "Software sources can be found here" and then a link.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline js_12345678_55AA

  • Regular Contributor
  • *
  • Posts: 177
  • Country: ht
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #602 on: July 25, 2019, 12:19:56 pm »
The only question I have is some odd behaviour I found.
If I use aborted write cycle to read chip ID I get 0xA16 but if I use second read cycle I always get 0x50B which is obviously shifted by a bit to the right.
So my question is which is actually right ID? Who said it should be 0xA16 and not 0x50B?

Hi,

just have a look in the PADAUK IDE header file: "PMS150C.INC":
...
.Assembly   OTP_ID      2A16h
...
Usually this matches the processor ID response (with some exceptions). Only the lower 12 bits are honored for all processors: => 0xA16  :)

JS
Easy PDK programmer and more: https://free-pdk.github.io
 
The following users thanked this post: lanserge

Offline ali_asadzadeh

  • Frequent Contributor
  • **
  • Posts: 867
  • Country: ir
    • ASiD Designer
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #603 on: July 25, 2019, 07:33:42 pm »
Quote
There is a message at the bottom of the page: "Software sources can be found here" and then a link.
Thanks FrankBuss :-+
You can order parts from www.ASiDesigner.com
we are a wire-based company
 

Offline gaganchd2000

  • Newbie
  • Posts: 3
  • Country: in
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #604 on: July 28, 2019, 04:52:31 am »
Hi

Probably this is very lame question here but still I need some help from experts. I have written blinky program in FPPA IDE and now want to burn code. But problem is I dont see .PDK file. I see only .c, .pre, .prj files.
Can you please let me know what i am missing.
I have chips and writer. No ICE.
 
 

Offline js_12345678_55AA

  • Regular Contributor
  • *
  • Posts: 177
  • Country: ht
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #605 on: July 28, 2019, 08:38:53 am »
Hi

Probably this is very lame question here but still I need some help from experts. I have written blinky program in FPPA IDE and now want to burn code. But problem is I dont see .PDK file. I see only .c, .pre, .prj files.
Can you please let me know what i am missing.
I have chips and writer. No ICE.

Hi,

A .PDK file is created in same folder as the project (.PRJ) file, which you choose to be at a different location than your source files: "C:\Users\gagan\Test_Blinky\Test_Blinky.PRJ".
So your .PDK file is here: "C:\Users\gagan\Test_Blinky\Test_Blinky.PDK"

If you just want to WRITE the compiled program to a chip, you don't have to leave the IDE.
There is a menu entry "Execute->Writer" which will open a writer dialog with all parameters filled in from your project.
The extra "WRITER.exe" is only for factories which mass produce ICs and do not need to open the compiler IDE.

BTW: Your IDE version (0.84) is a bit dated. There is a much newer (0.86) on PADAUK web site.

Last comment: Since this is the "Padauk Programmer Reverse Engineering" thread it would be nice if you consider using and improving the free open source tools (open hardware programmer / open source compiler) instead.


JS
Easy PDK programmer and more: https://free-pdk.github.io
 

Offline ali_asadzadeh

  • Frequent Contributor
  • **
  • Posts: 867
  • Country: ir
    • ASiD Designer
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #606 on: July 29, 2019, 08:06:22 am »
I have installed mingw on my windows machine and added the PATH to environment variables. also I have added make to my Git Bash!
How should I compile the PC software? I use this and I got  errors

Code: [Select]
make all

Quote
make all
cd lib/argp-standalone-1.3 && sh configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking for __attribute__... no
checking for working alloca.h... yes
checking for alloca... yes
checking for vprintf... yes
checking for _doprnt... no
checking for strerror... yes
checking for mempcpy... no
checking for strndup... no
checking for strchrnul... no
checking for putc_unlocked('x', stdout)... no
checking for flockfile... no
checking for fputs_unlocked... no
checking for fwrite_unlocked... no
checking for strdup... yes
checking for asprintf... no
checking whether program_invocation_name is declared... no
checking whether program_invocation_short_name is declared... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
C:/Program Files/Git/mingw64/bin/make -C lib/argp-standalone-1.3
make[1]: Entering directory 'C:/Users/ASiDesigner/Desktop/easy-pdk-programmer-software-master/easy-pdk-programmer-software-master/lib/argp-standalone-1.3'
C:/Program Files/Git/mingw64/bin/make  all-recursive
make[2]: Entering directory 'C:/Users/ASiDesigner/Desktop/easy-pdk-programmer-software-master/easy-pdk-programmer-software-master/lib/argp-standalone-1.3'
Making all in .
/usr/bin/sh: line 11: C:/Program: No such file or directory
make[2]: *** [Makefile:325: all-recursive] Error 1
make[2]: Leaving directory 'C:/Users/ASiDesigner/Desktop/easy-pdk-programmer-software-master/easy-pdk-programmer-software-master/lib/argp-standalone-1.3'
make[1]: *** [Makefile:215: all] Error 2
make[1]: Leaving directory 'C:/Users/ASiDesigner/Desktop/easy-pdk-programmer-software-master/easy-pdk-programmer-software-master/lib/argp-standalone-1.3'
make: *** [Makefile:33: lib/argp-standalone-1.3/libargp.a] Error 2

You can order parts from www.ASiDesigner.com
we are a wire-based company
 

Offline js_12345678_55AA

  • Regular Contributor
  • *
  • Posts: 177
  • Country: ht
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #607 on: July 30, 2019, 07:37:22 pm »
I have installed mingw on my windows machine and added the PATH to environment variables. also I have added make to my Git Bash!
How should I compile the PC software? I use this and I got  errors

There are multiple options to get it working on Windows.

I added a compiled binary to the Github project RELEASES: https://github.com/free-pdk/easy-pdk-programmer-software/releases  (1.0 - easy-pdk-programmer-software-windows.zip)

If you want to compile it yourself the most easy way I know of is to install MSYS2 which can then be used directly or with the in MSYS2 integrated MINGW. The package manager pacman in MSYS2 makes installing required components and libraries very easy. You find a lot of information about this on the internet.

Your specific problem with your MinGW installation looks like you installed it to a path which includes spaces (I think this was/is a problem with MinGW, try "C:\MinGW" instead).
Your build stops when it is looking for a dependency tool and only half of the path is visible:


Code: [Select]
make all
...
make[2]: Entering directory 'C:/Users/ASiDesigner/Desktop/easy-pdk-programmer-software-master/easy-pdk-programmer-software-master/lib/argp-standalone-1.3'
Making all in .
/usr/bin/sh: line 11: C:/Program: No such file or directory
make[2]: *** [Makefile:325: all-recursive] Error 1
...

You can see that "C:/Program" seems to be the start of "C:/Program Files/..."


Have fun,

JS
Easy PDK programmer and more: https://free-pdk.github.io
 

Offline ali_asadzadeh

  • Frequent Contributor
  • **
  • Posts: 867
  • Country: ir
    • ASiD Designer
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #608 on: July 31, 2019, 05:54:59 am »
Thanks JS :-+
You can order parts from www.ASiDesigner.com
we are a wire-based company
 

Offline tim_

  • Regular Contributor
  • *
  • Posts: 80
  • Country: de
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #609 on: August 12, 2019, 09:13:38 pm »
FYI, I ventured out and reviewed all sub $0.10 microcontrollers on LCSC. I hope it's somewhat useful:

https://cpldcpu.wordpress.com/2019/08/12/the-terrible-3-cent-mcu/

I can now confirm that the Padauk MCUs are the best in this segment. We knew this before, did we?

Well, now back to actual projects on the PFS154...

« Last Edit: August 12, 2019, 09:29:50 pm by tim_ »
 
The following users thanked this post: EEVblog, bitwelder, thm_w, edavid, Kean, js_12345678_55AA

Offline EEVblog

  • Administrator
  • *****
  • Posts: 29685
  • Country: au
    • EEVblog
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #610 on: August 14, 2019, 03:06:46 am »
FYI, I ventured out and reviewed all sub $0.10 microcontrollers on LCSC. I hope it's somewhat useful:
https://cpldcpu.wordpress.com/2019/08/12/the-terrible-3-cent-mcu/

Great article!  :-+
 

Offline socram

  • Regular Contributor
  • *
  • Posts: 62
  • Country: es
    • Totodile!
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #611 on: August 18, 2019, 09:46:40 pm »
After so many months, I realized I got a message on LCSC from apparently somebody from here asking if I had ever finished my programmer. That remind me of it, and I began yesterday working again on the firmware of the thing.

I have finally got around integrating the software-controlled SMPS and software-emulated USB on the ATtiny84, and most important, get them both working at the same time - to be honest I wasn't really sure if I'd manage to pull this off  ;D

But well, it looks like this tiny AVR is more than capable, and I've finally got Python to talk via libusb to the firmware, and from there command the PFS154 to enter read mode.

Code: [Select]
from usb1 import *
from libusb1 import *
import struct

CMD_START = 1
PDK_READ = 6

ctx = USBContext()
dev = ctx.getByVendorIDAndProductID(0x16C0, 0x05DC)
handle = dev.open()

with handle.claimInterface(0):
    print(handle.getProduct())
    devId, = struct.unpack("h", handle.controlRead(LIBUSB_REQUEST_TYPE_VENDOR, CMD_START, PDK_READ, 0, 2))
    print('Device ID: %03X' % devId)

handle.close()



Instead of loading the whole code to the AVR as the Easy PDK programmer does, which is just not feasible given the mere 512 bytes of RAM, I have several commands which just stream data on demand from/to the microcontroller in program.

The firmware so far is only able to enter a certain mode (ie setup VPP, setup VDD, send command and read and verify response), but it's not yet able to read/write/erase. However, given that the hard part is already done, it should be pretty easy.

The PCB and schematic are available at EasyEDA and are mostly final: https://easyeda.com/socram8888/padauk-programmer
The firmware is still being heavily worked on and it's available on my GitHub: https://github.com/socram8888/PdkProgrammer

 
The following users thanked this post: thm_w, tim_

Offline tim_

  • Regular Contributor
  • *
  • Posts: 80
  • Country: de
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #612 on: August 19, 2019, 07:22:51 am »
It seems that the upcoming PFS232 will also have a low voltage programming mode (5V). That should greatly simplify building a programmer. Maybe it would be possible to repurpose $2 USBASB clones.


 

Offline ali_asadzadeh

  • Frequent Contributor
  • **
  • Posts: 867
  • Country: ir
    • ASiD Designer
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #613 on: August 25, 2019, 10:33:46 am »
Hi,
I have build the easy Padauk programmer, the Altium files are attached. it's redesigned in Altium. Note that I have placed a LM258 part for the op-amp since this was the part that was available in my parts.

I have connected it to a PFS173-14pin device, the software recognize the part, But when I try to read, or erase the part I would get errors! do you have any Idea what might be wrong?



 |O ::) :-[


Also I want to use the FPPA IDE from Paduak, After compiling some demo project's it would produce  for example T16_Key_LED1.LB0 and T16_Key_LED1.PJ0 in the OBJ folder, which is not a bin nor a hex file, how should I convert the output to hex or bin?
You can order parts from www.ASiDesigner.com
we are a wire-based company
 
The following users thanked this post: ebclr

Offline js_12345678_55AA

  • Regular Contributor
  • *
  • Posts: 177
  • Country: ht
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #614 on: August 26, 2019, 12:06:06 pm »
Hi,

It looks like this is NOT an EASYPDK programmer. It shows "xProg V1.0" and "www.ASiDesigner.com" on the PCB but no sign of "freepdk" or "easpdkprog".

So most likely this is another thingy which does not violate the CC license from easypdkprog: See https://github.com/free-pdk/easy-pdk-programmer-hardware/blob/master/LICENSE  Section 3 -- License Conditions, a. Attribution, ...

In fact the PCB shows "ASiDesigner (C) 2019", so please contact them for support.

JS

« Last Edit: August 26, 2019, 12:08:12 pm by js_12345678_55AA »
Easy PDK programmer and more: https://free-pdk.github.io
 

Offline ali_asadzadeh

  • Frequent Contributor
  • **
  • Posts: 867
  • Country: ir
    • ASiD Designer
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #615 on: August 27, 2019, 06:09:58 am »
Quote
It looks like this is NOT an EASYPDK programmer. It shows "xProg V1.0" and "www.ASiDesigner.com" on the PCB but no sign of "freepdk" or "easpdkprog".
Thanks JS, it's just a redesign and I did it myself, it's for personal use! :)

The software is easpdkprog, only the PCB is changed to fit my needs.
You can order parts from www.ASiDesigner.com
we are a wire-based company
 

Offline js_12345678_55AA

  • Regular Contributor
  • *
  • Posts: 177
  • Country: ht
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #616 on: August 27, 2019, 03:58:24 pm »
Hi,

in case EASYPDK programmer reports IC-ID correctly with "probe" command but gives the error message "ERROR: Read failed" or  "ERROR: Write failed" then most likely the voltages VPP / VDD for read/write needs to be adjusted. This can be caused by long wires connecting the IC or a capacitor next to IC VDD or ...

I already optimized read/write voltages a bit more in development branch of the EASYPDK software to compensate extra capacitors / long wires:
https://github.com/free-pdk/easy-pdk-programmer-software/tree/development
(The new EASYPDK software version also requires to flash the new firmware from same development branch).

Regarding the use of PADAUK IDE: Since the IDE creates incompatible PDK files which do have special startup / calibration code inside which need special handling after flashing from PADAUK WRITER it is not possible to use the output and flash with EASYPDKPROG.
Instead you can use the free and open source SDCC compiler to compile your code. SDCC outputs .HEX files which can be used directly with EASYPDKPROG.

Have fun,

JS   
Easy PDK programmer and more: https://free-pdk.github.io
 

Offline ali_asadzadeh

  • Frequent Contributor
  • **
  • Posts: 867
  • Country: ir
    • ASiD Designer
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #617 on: August 28, 2019, 05:53:36 am »
Dear JS
Thanks, :-+ I will test it and update in here, Also if it works, you can add my Altium PCB files to the project, so there is more options for hardware design.
You can order parts from www.ASiDesigner.com
we are a wire-based company
 

Offline ali_asadzadeh

  • Frequent Contributor
  • **
  • Posts: 867
  • Country: ir
    • ASiD Designer
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #618 on: August 28, 2019, 06:00:20 am »
The MCU Firmware is compiling fine, But I can not compile the source code for the windows program! |O

Please note that I have managed to write a simple Hello world program for windows and it can compile! what am I doing wrong that I can not compile the easypdkprog in windows!
You can order parts from www.ASiDesigner.com
we are a wire-based company
 

Offline itelite

  • Contributor
  • Posts: 21
  • Country: us
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #619 on: August 28, 2019, 02:41:49 pm »
Is there someone willing to sell an assembled programmer for the PMS150C?  Official one seems very unavailable.
 

Offline ali_asadzadeh

  • Frequent Contributor
  • **
  • Posts: 867
  • Country: ir
    • ASiD Designer
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #620 on: August 29, 2019, 05:18:11 am »
Quote
Is there someone willing to sell an assembled programmer for the PMS150C?  Official one seems very unavailable.
It's open source, you can build it!  ^-^
mine has some issues, if I could solve them I can send you one.
You can order parts from www.ASiDesigner.com
we are a wire-based company
 

Offline ali_asadzadeh

  • Frequent Contributor
  • **
  • Posts: 867
  • Country: ir
    • ASiD Designer
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #621 on: August 29, 2019, 10:43:03 am »
I have installed Ubuntu on Virtual-box, I'm new to Linux, so how should I compile EASYPDK for windows?
You can order parts from www.ASiDesigner.com
we are a wire-based company
 

Offline itelite

  • Contributor
  • Posts: 21
  • Country: us
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #622 on: August 29, 2019, 01:47:19 pm »
Quote
Is there someone willing to sell an assembled programmer for the PMS150C?  Official one seems very unavailable.
It's open source, you can build it!  ^-^
mine has some issues, if I could solve them I can send you one.

i appreciate that.  yeah as a last resort ill build one.  if you get it sorted out let me know. 
 

Offline js_12345678_55AA

  • Regular Contributor
  • *
  • Posts: 177
  • Country: ht
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #623 on: August 30, 2019, 11:14:09 pm »
I have installed Ubuntu on Virtual-box, I'm new to Linux, so how should I compile EASYPDK for windows?

Because some people have trouble compiling on/for Windows, I added automatic builds (using travis-ci) to the freepdk github repository.

Every commit will now build the software for all 3 platforms (Linux/Mac/Windows) and check for errors.

Tags will automatically create ZIP files with the compiled binaries for all 3 platforms, available under "releases".

I created a temporary tag "1.1-development" from development branch. Here you can find the 1.1-development (work in progress) binaries for all 3 platforms:
https://github.com/free-pdk/easy-pdk-programmer-software/releases

Have fun,

JS
Easy PDK programmer and more: https://free-pdk.github.io
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 29685
  • Country: au
    • EEVblog
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #624 on: August 31, 2019, 04:46:54 am »
Quote
open source hardware programmer: https://github.com/free-pdk/easy-pdk-programmer-hardware

I have checked it, it has only the hardware files, where is the software files for the STM32 MCU and also the PC side software

I just tried to get this board made and it's in a 4x1 panel format, but only one of the boards is populated. Kinda annoying, can this be updated to just be a single non-panelised PCB?
Looks like no original PCB file available?
I don't want to edit the gerber files so I'll just get the panel made as is for testing.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf