hackfin

Automated debugging / hardware testing using Python

Discussion created by hackfin on May 26, 2010
Latest reply on May 31, 2010 by hackfin

Hi there,

 

It's been around inofficially for quite some time, now I thought it might be helpful to know for those who build their own hardware:

We found that boundary scan tests are kind of ineffective when it comes to complete system testing of Blackfin hardware that interoperates with non JTAG-capable chips, thus we tried to find a way doing this the automated way via scripting without flashing the hardware or needing more interfaces to verify the target.

Since the free Python scripting language seemed the best choice, I've made a few wrapper scripts around the bfemu JTAG library that allows:

 

  • remote control of the Blackfin CPU (read/write memory and registers)
  • stop CPU, run CPU, setting of breakpoints, PLL initialization
  • smart memory tests (page tests, mirroring)
  • Automated downloads of ELF executables to the target, production mature flash programming

 

We use it to avoid the expensive ICTs, moreover, it saves us quite some time per target - just a simple needle adapter needs to be made to connect to the JTAG to run through a few boards. With the Python mysql module, it's actually quite easy to commit test results and serial numbers, etc. to your production database - there are plenty of other useful Python modules to output images, etc.

Apart from that, the scripting solution can be used to debug for example complex multiprocessor issues where unwanted events occur after a certain history.

If you have more inspiring thoughts or questions, feel free to bug me.

 

Greetings,

 

- Martin

Outcomes