Skip to main content

Messages

This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - Jim

1
Pirate PIC programmer / Re: Bus Pirate PIC 24F Programmer Dev Thread
Hmm, I don't have any first hand experience with the 18f24j50's, but I can give you a couple of general pointers. Put NOPs between everything, seriously it's just easier to put NOPs everywhere than figure out what, exactly, does need a NOP or two. Also look at the source code of the OpenProg project, that also helped me a lot.

Having a 1 minute look at the programming spec vs the OpenProg code I can see that in their write function they use:
0x8EA6;
0x9CA6;

Instead of the:
0x84A6

From the data sheet, don't ask me why but it might help :P
3
Pirate PIC programmer / Bus Pirate PIC 24F Programmer Dev Thread
Since there isn't a thread (that I could find) about the recent blog posts I started this one.

Attached is a script to read the configuration words, you will have to remove the .txt extension and add a .scrp24 extension.

One thing to note is that the Programming Spec says that we should load CW2Address15:0 into W6 with the SIX instruction 2xxxx7 (2ABFC7 for the bus pirate's pic). This does not work and looking at the openprog source code the line should be 2xxxx6 (2ABFC6), which is logical since it's safe to assume that the last nibble defines the target register.

edit: WOOT! I have a script to write the configuration words up and running. You will need to modify lines 29 and 99 to suit your own purposes though and if bit 15 of the REGOUT doesn't clear by the end of step 8 add some duplicate step 8s to pad out the wait.

edit2: I did a couple more short scripts. One to demonstrate writing code memory and one to read code memory, but, due to the fact that my code that reads the scripts (I don't have a functioning bus pirate so I can't use the one in the dangerous prototypes repo), it just writes and reads the first 48 bytes of a table page.

So if you erase your chip with 7's script in the repo then run the attached ReadCodeMemory script you should read out 48 Fs. Then run the WriteCodeMemory script it will be programmed with 0123456789ABCDEF13579BDFFDB97531FEDCBA9876543210 starting at memory address 0x000200 which is the beginning of user flash program memory. Running the Read script again will read out the newly programmed code.

edit3: I just realized that to get this to work with the program in the repo you'll need to play with the timings. My programmer clocks the data in and out at 10ms per bit, which is really slow, but it works and rules out timing as a factor if any issues come up.
5
Bus Pirate Development / Re: Can the TF232 chip... be eliminated ?
Here's the snippet from the "Release_Notes_for_STM32F10x_CMSIS"
Quote
The enclosed firmware and all the related documentation are not covered by a License Agreement, if you need such License you can contact your local STMicroelectronics office.

I may have been wrong in my original statement but you have to agree that the licenses are far from transparent.
6
Bus Pirate Development / Re: Can the TF232 chip... be eliminated ?
The stm32 libraries are built around the CMSIS core libraries. Of the CMSIS core libraries we are able to "Use and Copy" them, but not modify them and all rights are reserved by ARM. Also they can be "freely distributed within development tools that are supporting such ARM based processor". From what I understand this does not include source code for open source projects.

Upon closer inspection I believe you are right with regards to the stm32 specific libraries in that there is no license.

I didn't say it would be a problem, just that it may be a problem, as I don't have a lot of experience with open source projects, and it doesn't hurt to have a separate GPL library out there.
7
Bus Pirate Development / Re: Can the TF232 chip... be eliminated ?
If the stm32 project were to go ahead I would be happy to help out.

One issue that may be a problem is, while the libraries etc may be free, they have a very restrictive license when it comes to distributing the libraries within an open source project. Some of the libraries you are not even able to legally alter.

An open source project working on the problem is libopenstm32 but that is still in beta phase, not everything is implemented etc.

As a test board we could use an existing hardware setup, then when the software is in place create a more user friendly board:
http://futurlec.com/ET-STM32_Stamp.shtml

That's cheap ($25), gives us 512k flash, 64k ram and built in bootloader (cross platform using a python script).
9
Open Bench Logic Sniffer / Re: [Unsolved] Anybody managed to get the software running on a mac?
Thanks for your help sdixon, I finally got it working. Instead of using the version you linked to I used the "Official" SUMP version 0.8. Just downloaded the precompiled binaries and they work for me.

One thing to note is, don't run the logic analyzer through a usb hub. It works sometimes through a hub but it has worked every time through a direct port.

Oh, in the interest of people reading this later I'm running mac os x, 10.5.8 on an intel imac
10
Open Bench Logic Sniffer / Re: [Unsolved] Anybody managed to get the software running on a mac?
@sdixon: hmm, that method doesn't seem to work for me, I'm running 10.5.8. It throws up an error and tells me to check my console, this is the output:
Code: [Select]
6/05/10 2:34:43 AM [0x0-0xfa8fa8].com.apple.JarLauncher[73950]  at java.lang.ClassLoader.loadClass(ClassLoader.java:251) 
6/05/10 2:34:43 AM [0x0-0xfa8fa8].com.apple.JarLauncher[73950]  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
6/05/10 2:35:04 AM [0x0-0xfaafaa].com.apple.JarLauncher[73953] Exception in thread "main" 
6/05/10 2:35:04 AM [0x0-0xfaafaa].com.apple.JarLauncher[73953] java.lang.UnsupportedClassVersionError: Bad version number in .class file
6/05/10 2:35:04 AM [0x0-0xfaafaa].com.apple.JarLauncher[73953]  at java.lang.ClassLoader.defineClass1(Native Method)
6/05/10 2:35:04 AM [0x0-0xfaafaa].com.apple.JarLauncher[73953]  at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
6/05/10 2:35:04 AM [0x0-0xfaafaa].com.apple.JarLauncher[73953]  at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
6/05/10 2:35:04 AM [0x0-0xfaafaa].com.apple.JarLauncher[73953]  at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
6/05/10 2:35:04 AM [0x0-0xfaafaa].com.apple.JarLauncher[73953]  at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
6/05/10 2:35:04 AM [0x0-0xfaafaa].com.apple.JarLauncher[73953]  at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
6/05/10 2:35:04 AM [0x0-0xfaafaa].com.apple.JarLauncher[73953]  at java.security.AccessController.doPrivileged(Native Method)
6/05/10 2:35:04 AM [0x0-0xfaafaa].com.apple.JarLauncher[73953]  at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
6/05/10 2:35:04 AM [0x0-0xfaafaa].com.apple.JarLauncher[73953]  at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
6/05/10 2:35:04 AM [0x0-0xfaafaa].com.apple.JarLauncher[73953]  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
6/05/10 2:35:04 AM [0x0-0xfaafaa].com.apple.JarLauncher[73953]  at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
6/05/10 2:35:04 AM [0x0-0xfaafaa].com.apple.JarLauncher[73953]  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)

@elbeem: Thanks for the tip, could you explain what you mean for less knowledgeable people ;)

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01552407680session_write_close ( )...(null):0
20.01582539272ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01582540048Database_MySQL->query( ).../DatabaseHandler.php:119
40.06312678784Database_MySQL->error( ).../Db-mysql.class.php:273