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

0 Members and 3 Guests are viewing this topic.

Offline suzhiming

  • Contributor
  • !
  • Posts: 33
  • Country: cn
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1375 on: June 19, 2021, 06:28:00 am »
I'd like to try it out.  cannot execute  lack  IDE
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 2823
  • Country: fi
    • My home page and email address
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1376 on: June 19, 2021, 09:42:15 am »
I'd like to try it out.  cannot execute  lack  IDE
Download and install sdcc-4.1.0-x64-setup.exe first, and then codeblocks-20.03-setup.exe.  Then, Code::Blocks will be your IDE.

If Code::Blocks does not autodetect SDCC, go to 'Settings', 'Global compiler settings' tab, and for 'Selected compiler' pick 'Small Device C Compiler'.  In the 'Toolchain executables' tab, set 'Compiler's installation directory' to 'C:\Program Files\SDCC\'.
 
The following users thanked this post: suzhiming

Offline spth

  • Regular Contributor
  • *
  • Posts: 147
  • Country: de
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1377 on: June 19, 2021, 04:01:09 pm »
I'd like to try it out.  cannot execute  lack  IDE

SDCC does not include an IDE. However, some IDEs, such as Code::Blocks do have support for SDCC.

SDCC is basically just a compiler (though it includes standard library, assembler, linker and simulator).
 
The following users thanked this post: suzhiming

Offline suzhiming

  • Contributor
  • !
  • Posts: 33
  • Country: cn
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1378 on: June 20, 2021, 07:39:58 am »
可以申请样片    You can apply for samples
 

Offline suzhiming

  • Contributor
  • !
  • Posts: 33
  • Country: cn
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1379 on: June 20, 2021, 07:46:08 am »
可以用仿真芯片吗?    Can I use a simulation chip?
 

Offline spth

  • Regular Contributor
  • *
  • Posts: 147
  • Country: de
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1380 on: June 20, 2021, 08:50:39 am »
可以用仿真芯片吗?    Can I use a simulation chip?

AFAIK, the free toolchain based on SDCC currently does not support the use of the Padauk ICE (in-circuit-emulator).

There are uCsim simulators that come with SDCC, but they are software only and while they do simulate the core, AFAIK support for peripherals is incomplete. Also uCsim currently only supports only the following: PMC153, PMS132B, PMS134. Those have been chosen so that most software for a pdk13/pdk14/pdk15 chip should be able to run on one of them. The uCsim simulators should be very reliable, as they are used for the nightly regression testing (i.e. every night the SDCC compile farm compiles a large number of test programs using the latest SDCC, and executes them using uCsim to detect any possible regressions in SDCC).
« Last Edit: June 20, 2021, 10:15:10 am by spth »
 
The following users thanked this post: suzhiming

Offline suzhiming

  • Contributor
  • !
  • Posts: 33
  • Country: cn
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1381 on: June 22, 2021, 12:02:52 pm »
IDE course 使用教程,我不会用
 

Offline js_12345678_55AA

  • Frequent Contributor
  • **
  • Posts: 298
  • Country: ht
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1382 on: July 06, 2021, 10:36:58 am »
PCB Manufacturer Support only    <20mb file
我想做一个烧录器,工厂只接受小于20mb文件,仅支持GERBER文件最大外尺寸10*10cm
烧录芯片的文件,现在芯片昂贵,有什么廉价芯片可以代换吗8051,stc,padauk?

The PCB manufacture file is 157 kB (this is <20mb for sure): https://github.com/free-pdk/easy-pdk-programmer-hardware/raw/master/pcb/Gerber_EASYPDKPROG_PCB12_NoSilk.zip

The IC (STM32F072) seems to be available from several sellers for 30-50 RMB: https://s.taobao.com/search?q=STM32F072C8T6

In case you want to be sure to get an original, you could buy a STM32F072 Nucleo board and use the IC from this board (80-100 RMB): https://s.taobao.com/search?q=STM32F072+nucleo
(This would required to modify the PCB since the Nucleo comes with a 64 pin package)

JS
« Last Edit: July 06, 2021, 10:40:08 am by js_12345678_55AA »
Easy PDK programmer and more: https://free-pdk.github.io
 

Offline LovelyA72

  • Contributor
  • Posts: 46
  • Country: us
  • Kashikoma from Massachusetts!
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1383 on: July 07, 2021, 01:45:50 am »
PCB Manufacturer Support only    <20mb file
我想做一个烧录器,工厂只接受小于20mb文件,仅支持GERBER文件最大外尺寸10*10cm
烧录芯片的文件,现在芯片昂贵,有什么廉价芯片可以代换吗8051,stc,padauk?
You have to use a micro that contains a DAC(NOT PWM) and have a sufficient amount of flash storage. Since the firmware is open source, you can port the firmware to any platform. (What's the license of these codes again?) Make sure you comply the source code license and disclose the source code when needed.
Kashikoma!
 

Offline bovineck

  • Contributor
  • Posts: 16
  • Country: au
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1384 on: July 11, 2021, 06:59:35 am »
Hi all - I have a few working freepdk programmers (and some that are not so working) and I have recently upgraded my computer (running Linux Mint) to boot from a 1Tb SSD (for speed!). Alas the computer no longer talks to the freepdk programmer (but lsusb and dmesg show it to be present). To help me narrow down the problem solving path, should I be looking for new:

     1. bios firmware
     2. motherboard
     3. power supply
     4. operating system (although the old one worked??)
     5. kernel module
     6. hobby
     7. brain

Note that pulling out the new SSD and booting into the old hard drives did not work.

Any suggestions gratefully accepted - here's some reports from my system

sudo lsusb -v

Code: [Select]
Bus 003 Device 005: ID 0483:5740 STMicroelectronics Virtual COM Port
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            2 Communications
  bDeviceSubClass         2 Abstract (modem)
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0483 STMicroelectronics
  idProduct          0x5740 Virtual COM Port
  bcdDevice            2.00
  iManufacturer           1 free-pdk.github.io
  iProduct                2 Easy PDK Programmer
  iSerial                 3 1234567855AA
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0043
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              0
      CDC Header:
        bcdCDC               1.10
      CDC Call Management:
        bmCapabilities       0x00
        bDataInterface          1
      CDC ACM:
        bmCapabilities       0x02
          line coding and serial state
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              16
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0001
  Self Powered


dmesg

Code: [Select]
[ 4797.390785] usb 3-10: new full-speed USB device number 5 using xhci_hcd
[ 4797.540232] usb 3-10: New USB device found, idVendor=0483, idProduct=5740, bcdDevice= 2.00
[ 4797.540237] usb 3-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4797.540240] usb 3-10: Product: Easy PDK Programmer
[ 4797.540242] usb 3-10: Manufacturer: free-pdk.github.io
[ 4797.540244] usb 3-10: SerialNumber: 1234567855AA
[ 4797.611233] cdc_acm 3-10:1.0: ttyACM0: USB ACM device
[ 4797.611506] usbcore: registered new interface driver cdc_acm
[ 4797.611507] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

Bovineck (OneCircuit)
You're unique, like everyone else
 

Offline retiredfeline

  • Regular Contributor
  • *
  • Posts: 242
  • Country: au
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1385 on: July 11, 2021, 07:48:01 am »
Does your account have permissions on /dev/ttyACM0? Often it's just a matter of making yourself a member of the group that the is the group owner of the try device. The group is often dialup or something like that and the device permissions are often 0664. Sometimes you need to install a udev rule to chgrp and chown the device upon detection when plugged in.
 

Offline LovelyA72

  • Contributor
  • Posts: 46
  • Country: us
  • Kashikoma from Massachusetts!
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1386 on: July 12, 2021, 02:44:33 am »
10*10 pcb 拼板已做好,我有j-link,怎么将文件下载到芯片
STM32F072 supports USB-DFU. You don't need a jlink to flash the firmware. Just hold the button while plugging the USB and you should be in the DFU mode. 你不需要jlink来下载固件。STM32F072支持USB-DFU。
Kashikoma!
 

Offline bovineck

  • Contributor
  • Posts: 16
  • Country: au
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1387 on: July 12, 2021, 03:44:35 am »
Quote
Does your account have permissions on /dev/ttyACM0? Often it's just a matter of making yourself a member of the group that the is the group owner of the try device. The group is often dialup or something like that and the device permissions are often 0664. Sometimes you need to install a udev rule to chgrp and chown the device upon detection when plugged in.

Wonderful! Thank you that solved the issue.  :)

Bovineck (OneCircuit)
You're unique, like everyone else
 

Offline LovelyA72

  • Contributor
  • Posts: 46
  • Country: us
  • Kashikoma from Massachusetts!
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1388 on: August 02, 2021, 02:44:56 am »
seems like they got a simplified version of their writer. Just like their simplified ICE, the whole PCB is exposed.
Kashikoma!
 

Offline bovineck

  • Contributor
  • Posts: 16
  • Country: au
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1389 on: August 11, 2021, 12:02:17 pm »
I was happily programming PFS154 chips one day and then the next day...

Code: [Select]
Searching programmer... found: /dev/ttyACM0
FREE-PDK EASY PROG - Hardware:1.2 Firmware:1.3 Protocol:1.3
Erasing IC... done.
Blank check IC... FPDK_ERROR: chip is not blank

If I use --noblank --noverify then calibration fails:

Code: [Select]
Erasing IC... done.
Writing IC (81 words)... done.
Calibrating IC
* IHRC SYSCLK=1000000Hz @ 4.00V ... calibration result: 0Hz (0x00)  out of range.
ERROR: Calibration failed

Different chips and changing the programmer doesn't seem to work.

easyprogtest reports:

Code: [Select]
vdd: 4.93   vpp: 4.98    (vref= 3.30) 

It's a bit of a head scratcher!  :-//

Late addition: my PFS173 chips are fine with the same setup and code - just the PFS154s that are suddenly not cooperative  :(

« Last Edit: August 11, 2021, 12:11:24 pm by bovineck »
You're unique, like everyone else
 

Offline bovineck

  • Contributor
  • Posts: 16
  • Country: au
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1390 on: August 11, 2021, 12:26:30 pm »
Quote
Late addition: my PFS173 chips are fine with the same setup and code - just the PFS154s that are suddenly not cooperative  :(

UPDATE: Just those few PFS154 chips. Have thrown them out and performed cleansing ceremony. Sorry for interruption, normal service resumed... :-+
You're unique, like everyone else
 

Offline js_12345678_55AA

  • Frequent Contributor
  • **
  • Posts: 298
  • Country: ht
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1391 on: August 16, 2021, 07:55:31 am »
Quote
Late addition: my PFS173 chips are fine with the same setup and code - just the PFS154s that are suddenly not cooperative  :(

UPDATE: Just those few PFS154 chips. Have thrown them out and performed cleansing ceremony. Sorry for interruption, normal service resumed... :-+

Could you ERASE and then READ one of those "faulty" PFS154?

Maybe you wrote something to the "reserved area" (0x7E0-0x7F0) previously. If so, it might be that you turned sections of the flash to READ-ONLY mode. (I found some bits there which disable parts of the flash to be erased/written to. This would explain why you can't erase / write to this ICs properly).

In case this happened to you, I will consider adding a safety feature preventing to write to reserved area (something like an extra command line option like "--write-reserved-area", if not given then write is prohibited).

JS
« Last Edit: August 16, 2021, 07:57:57 am by js_12345678_55AA »
Easy PDK programmer and more: https://free-pdk.github.io
 

Offline bovineck

  • Contributor
  • Posts: 16
  • Country: au
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1392 on: August 23, 2021, 04:53:13 am »
Quote
Could you ERASE and then READ one of those "faulty" PFS154?

They would definitely read, but I'm not sure about erase. I threw them out! Next time I have the same problem I will check.

On a COMPLETELY unrelated matter, how would I compile an assembly file for the PFS154 and write the hex file to the chip?
You're unique, like everyone else
 

Offline retiredfeline

  • Regular Contributor
  • *
  • Posts: 242
  • Country: au
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1393 on: August 23, 2021, 05:16:22 am »
SDCC has an assembler. Just run SDCC with the appropriate options (IIRC it does the right thing if the file extension is that of assembler) and it will skip the C compile step. But you still need the startup code so you might want to retain the main() in C and call your assembly code. Or insert inline assembly code in the C code.
 

Offline bovineck

  • Contributor
  • Posts: 16
  • Country: au
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1394 on: August 23, 2021, 12:18:47 pm »
Quote
SDCC has an assembler. Just run SDCC with the appropriate options (IIRC it does the right thing if the file extension is that of assembler) and it will skip the C compile step. But you still need the startup code so you might want to retain the main() in C and call your assembly code. Or insert inline assembly code in the C code.

I compiled the start-up code with an empty main() and checked out the resulting assembly file that SDCC generated, but then I couldn’t see any way to use it as a template for an assembly version of the start-up code. I’m not sure that method is completely dead for me but I need to spend a lot more time on it.

In the meantime I like the idea of calling assembly code from the C code. It’s more complicated than what I’d like but it’s a nice work around, thank you! I’m not much of a fan of in-line assembly, and I’m not sure why that is!


You're unique, like everyone else
 

Offline serisman

  • Regular Contributor
  • *
  • Posts: 95
  • Country: us
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1395 on: August 28, 2021, 03:05:18 am »
Hello again, everyone.  It's been a while since I posted anything, but I have been following along, and still reach for the Padauk MCUs occasionally for projects.  Part of what has kept me from staying more excited has been the global component shortages and the fact LCSC currently has zero stock of Padauk MCUs.  >:(  Hopefully this is resolved soon.

Anyway, I thought I would post a new 'dev board' that I recently came up with to make breadboard prototyping a bit easier.  One of the challenges has been having to physically move the MCU back and forth between the programmer and the breadboard.  I did come up with the idea of using 1.27mm headers to turn the SOIC MCU into a pluggable module (see my post a few pages back).  This helped, and I do use this with custom PCBs to make easier to test different code versions, but it still seemed a bit too annoying for breadboard prototyping.

This new 'dev board' solves the issue by using two DPDT switches that physically isolate the VDD (ICVDD), PA3 (ICPCK), PA5 (ICVPP), and PC6 (ICPDA) pins during programming from whatever is on the breadboard and vice-versa (see schematic).  This means, all I have to do is flip the switches over towards the 2x4 programming header and run my programming command, and then flip the switches back to the other side to run the code.  I had thought of using CD4053 analog switch ICs at first, but the design was getting too complicated, partly because of the different voltages in play, and I still needed a switch to change modes, so I backed away from that idea for now.

Anyway, here are the gerber files and schematic if anyone wants them.  OSHPARK purchase link: https://oshpark.com/shared_projects/BhdQLc4h. It is designed to work with either the PFS154 or PFS173 16-pin ICs.  Technically it should also work with the PFC154 IC, although I don't have any of those to test with.  I can post these files to a github repo if there is enough interest.

I use a 8-wire IDC cable with 2x4 female connectors on either end.  One end plugs into an adapter that plugs into my easy-pdk-programmer, the other end plugs directly into this dev board.  The DPDT switches are LCSC part number: C108742.  Funny how they cost more than the Padauk MCUs.   :-DD

Oh, yeah, there are also LEDs on PA3/PA4, and a Push Button on PA5/RST that make this ready to go for the examples found in the http://github.com/free-pdk/free-pdk-examples repo.
« Last Edit: August 28, 2021, 04:46:29 am by serisman »
 
The following users thanked this post: oPossum, tim_

Offline LovelyA72

  • Contributor
  • Posts: 46
  • Country: us
  • Kashikoma from Massachusetts!
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1396 on: September 03, 2021, 01:24:14 am »
https://www.kuaishou.com/f/XTxuFXDaAWv1Wz

错误就是我应该选win版本就好了,需要.exe文件,软件根本就不会用,有使用指导么?太难了
苏sir你还是发英语吧,用百度翻译一下都好啊。大家都会方便很多。
Please use English while posting on this forum. As most of the members on the forum does not understand Chinese.
« Last Edit: September 03, 2021, 01:27:26 am by LovelyA72 »
Kashikoma!
 

Offline tim_

  • Regular Contributor
  • *
  • Posts: 192
  • Country: de
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1397 on: September 09, 2021, 05:50:20 am »
 

Offline LovelyA72

  • Contributor
  • Posts: 46
  • Country: us
  • Kashikoma from Massachusetts!
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1398 on: September 11, 2021, 11:22:07 am »
A few days ago I walked him through with an online meeting. He's now switched to ubuntu for better software support
Kashikoma!
 
The following users thanked this post: js_12345678_55AA

Offline makersLabs

  • Newbie
  • Posts: 2
  • Country: us
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #1399 on: September 12, 2021, 12:14:37 pm »
Hi,

This look very good projet and I wanna have programmer for some cheap board later so
I have done assembly for 5 Programmer using provided GERBER files
I successfully program the ST32 chip
I am under windows 10 and also alrdy install the STM32 driver
Using easypdkprog list or --version I get an answer (confirmed version 1.3)
But when I wanna try the probe command the answer is "probing IC... Nothing found" with a PFS154 or PFS173 fresh new chip

This append on all of the programmers, so I guess something wrong :-5
What checking on PCBA can I run to fix this?
What command can I pass to check all?

Rgds
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf