RetroBSD

2.11BSD operating system for microcontrollers
It is currently Fri May 29, 2020 1:52 pm

All times are UTC




Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Litebsd wifire
PostPosted: Sat Nov 21, 2015 9:58 am 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Serge,

Got WiFire :). Getting it up....

Pic32prog:

Using /dev/ttyUSB0 and reset button under Linux Knoppix 7.2.0. Libraries load OK. Seems to be OK.

1. ./pic32prog -d /dev/ttyUSB0 -r boot.hex 0x9d000000 0x20000. [I like to read device before trying to modify it.]

says device cannot be read? Do I need to use jtag to read it?

2. Tried to get pic32prog sources from github -> cert error?

Otherwise things seem to be more or less OK :).

Lots of fun

Wiz


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Mon Nov 23, 2015 9:28 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi All,

1. WiFire was originally programmed VIA jtag [scratch marks in those PCB holes.]

2. So far my PIC32 MX jtag kludge gets no response from WiFire jtag pins?? Maybe this is due to the 'boot loader' turning off jtag pins. Or maybe the jtag protocol is much different on the MZ? I have verified that my my jtag kludge still talks to my PIC32 MX stuff. Waveshapes appear basically the same in both cases. But no data coming from the MZ.

3. So it would be nice if pic32prog could be made to read the current contents of my WiFire board. [please :)]

4. I suppose another route is to order some 'virgin' MZ chips and see if I can jtag read them.

5. And I guess I should study the MZ verses MX jtag protocol.

As always any comments appreciated.

Matt, how to you program your MZ chips? And can you read the contents of your as received chips?

Wiz


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Mon Nov 23, 2015 9:39 pm 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
I program them using the picki2 and pic32prog. Works nicely.

Yes, by default, the Digilent bootloader has JTAG disabled.

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Tue Nov 24, 2015 3:00 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Matt,

Thanks.

Can you read the as received binary contents of the MZ EF with either of those tools?

Here, pic32prog says it cannot read the device but I haven't seen the source code yet so I am not sure why it is saying it cannot read the chip?

I gather I can [perhaps] reset the chip and get started that way, but I REALLY don't want to do that as it makes debugging obscure bugs virtually impossible.

Again further comments most appreciated.

Retrobsd and MX are looking much more interesting right now :(.

Particularly if I did some virtual MMU kiludge for RetroBSD.

Lots of fun. Especially with these chip vendor surprises :).

Wiz


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Wed Nov 25, 2015 7:11 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Matt,

j-tag disabled.... Thanks. That explains that observation.

I wonder if any of the ICSP ports are enabled with the stock wifire code? Matt?

The serial interface must be working somewhat since I get a response from pic32prog when the reset button is pushed, but I haven't found anything defining that protocol? So maybe that is a way to read the bits in flash and RAM and i/o and config memory?
I notice that pic32prog did not print the config information via the serial interface [/dev/ttyUSB0] ?

I did find on Digilent site a hex file which purports to be the wifire boot loader along with a bunch of click here, click there stuff, but nothing about reading the hex from a previously programmed device :(.

I did call digilent.... Didn't have the magic formula....

Matt or Serge: How do you e-mail them to ask tech. questions or did I somehow miss the web mail interface on their site?

I guess the next step is to create some sort of ICSP driver to see if those ports are enabled.

Please share any suggestions.

Thanks,

Wiz


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Wed Nov 25, 2015 8:40 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi All,

So I wondered if I could verify that the chipKit.hex file was programmed OK into the device?

The pic32prog -d /dev/ttyUSB0 -v file.hex executes and reads a the desired blocks from the device which match the file.hex locations :).

But the data read is all 0xffffffff.

At least it is trying to work :).

I wonder if trying to read different locations gives different results.

I seem to recall that writing to 1fc0xxxx did not have the same effect as 9fc0xxxx.

Hmmmm....

More to learn.

Lots of fun.

Wiz


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Wed Nov 25, 2015 11:32 pm 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
You can't disable ICSP, it's always enabled regardless of config settings.

As for support, that's confidential :) I just talk to Keith and he has the answers. Usually through the chipKIT steerage committee mailing list that I am part of.

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Thu Nov 26, 2015 2:37 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1081
Location: Sunnyvale, CA
Hi Wiz,

I will try to collect all your questions and answer them in one long message. :)
wiz wrote:
1. ./pic32prog -d /dev/ttyUSB0 -r boot.hex 0x9d000000 0x20000. [I like to read device before trying to modify it.]
says device cannot be read? Do I need to use jtag to read it?
Unfortunately, the chipKIT bootloader does not allow to read the contents of Flash memory. You can read only the regions of memory you have erased and programmed (in the same session) - for verification purposes.

You can read the memory with pickit2 or some JTAG adapter, like MIPS bus blaster.

wiz wrote:
2. Tried to get pic32prog sources from github -> cert error?
The most straightforward way to get the sources is to use GIT utility:
Code:
git clone https://github.com/sergev/pic32prog.git

wiz wrote:
1. WiFire was originally programmed VIA jtag [scratch marks in those PCB holes.]
You can use either ICSP connector (with pickit2) or JTAG connector (with bus blaster) to restore the bootloader using pic32prog, or to load your application overwriting the bootloader.

wiz wrote:
2. So far my PIC32 MX jtag kludge gets no response from WiFire jtag pins?? Maybe this is due to the 'boot loader' turning off jtag pins. Or maybe the jtag protocol is much different on the MZ? I have verified that my my jtag kludge still talks to my PIC32 MX stuff. Waveshapes appear basically the same in both cases. But no data coming from the MZ.
Unfortunately, the default chipKIT bootloader disables the JTAG interface early at startup, by clearing the CFGCONbits.JTAGEN bit.

wiz wrote:
3. So it would be nice if pic32prog could be made to read the current contents of my WiFire board. [please :)]
This is not possible with the default bootloader. Use pickit2 to read the memory.

wiz wrote:
5. And I guess I should study the MZ verses MX jtag protocol.
You will not find any differences. It's the same protocol.

wiz wrote:
I wonder if any of the ICSP ports are enabled with the stock wifire code?
ICSP port is always enabled. It has one minor drawback, though: to connect to the processor, you must reset it first. With EJTAG port, you can connect and disconnect to the running application, without disturbing it much.

wiz wrote:
I notice that pic32prog did not print the config information via the serial interface [/dev/ttyUSB0] ?
The chipkit bootloader does not allow to read the configuration information from the microcontroller.

wiz wrote:
Matt or Serge: How do you e-mail them to ask tech. questions or did I somehow miss the web mail interface on their site?
Digilent has a nice forum, pretty responsive: https://forum.digilentinc.com/forum/5-chipkit-boards/

wiz wrote:
So I wondered if I could verify that the chipKit.hex file was programmed OK into the device?
When you write to the Flash memory via the bootloader protocol, in the same session you are allowed to read the contents back. After disconnect, you cannot read memory anymore.

Best wishes,
--Serge


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Thu Nov 26, 2015 3:42 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Serge and Matt,

Many thanks for your very helpful and informative comments :). I have just spent some time patching pic32prog VIA /dev/ttyUSB0 in various ways. [ verifying that I cannot read memory :) ]

My current plan is to teach one of my RetroBSD boards to talk ICSP to the MZ. So I am VERY glad to hear I 'should' be able to read the board contents this way!

We have a resident RetroBSD compiler and known good pic32prog code. So the rest is just SMOP (Small matter of programming and a few wires :).

Just read about PiZero. Now I/we just need to do a PIC Zero :). I wonder who will be the first to build a 'super computer' with a bunch of cheap boards? Now if there was just something worth doing!

I guess another tool for me to consider is a reverse assembler for the stock WiFire.hex file and the WiFire memory contents.

I like to verify what is actually running in my stuff! Rather than what 'should' be running :).

Lots of fun.

Wiz


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Thu Nov 26, 2015 8:39 pm 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
I have been mulling the concept of a PIC based massive neural net computer - many hundreds (even thousands) of small PIC chips all interlinked with those around them - they have no "set" role but take on a role depending on what data they receive from others, and what the others around them are doing. Roles like calculations, short term memory, long term memory, pattern matching, etc. Just turn it on and let it evolve itself and see what it turns into... :twisted:

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Thu Nov 26, 2015 10:31 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi Matt,

I too think a self programming computer is very interesting and within range.

I see it as a memory node oriented box. Each CPU can talk to several nearby RAM nodes.

If you study how neurons are thought to work, it is not too hard to imagine such an array. A 3D array would have each CPU talking to 6 nearest neighbor RAMs.

Also as usually modeled neurons sum or subtract their various inputs while actual neurons plus inputs are like sum inputs while minus inputs are more like division. I assume more progress along these lines has now been made. But once you have one cheap node built you just need to expand the array until something [hopefully] begins to happen.

I think an array could probably teach itself to decode 'Morse" code with individual nodes learning to respond to letters, words and higher level abstractions as the array got bigger and learned for a longer period of time.

"Too soon old, too late smart :)"

Lots of fun.

Thanks very much for your comments :)

Wiz


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Fri Nov 27, 2015 9:50 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
That would be great if the neurons (and the synapses) work such simple way :)
Long time back (mid 80's) I took a part on a workshop - neural networks - and "the transputers" were the chips to be used at that time :ugeek:
https://en.wikipedia.org/wiki/Transputer

Also Forth chips - like http://www.greenarraychips.com/ might be used - you get 144 cores on a chip @700MHz each :)

What about PIC10F322 chips - you may place 2.000 of them on a 10x10cm board (when lucky).. You also get 2000 (simultaneous) analog inputs.. So you can touch, feel, see, hear, smell :)

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Fri Nov 27, 2015 11:14 am 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
I was thinking about designing a multi-core chip based around the behemoth hive design (one "queen", lots of "workers" using the pic10 core as the main CPU architecture. Add to that a few peripherals for communication between them and you have a highly scalable architecture. Simple to implement on an FPGA, and the PIC10 core is incredibly simple to create - I wrote an entire PIC10 emulator in a matter of a few hours once - just 768 lines of C including lots of { on lines by themselves (my coding style of the day).

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Fri Nov 27, 2015 2:38 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Such network of MCUs must be fully sw reconfigurable on the fly, imho..
I mean - you must be able to change the program itself anytime.
That would not work with pic10 or others (maybe inside of an FPGA it could be doable).
What could work is with MCUs where the "program" will be executed either out of ram, or, with help of a scripting language interpreted by the respective MCU.
So an array of pic32mx or pic32mz (when talking mchp) could work fine. They may communicate via 4 usarts, or/and share a common 8/16bit PMP bus.

But first you have to create a programming environment, however. It may take next 15 years, so I would not start with a pcb design till then :lol:

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Fri Nov 27, 2015 2:45 pm 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
Of course it would be reprogrammable on the fly. The PIC10 aspect is just the execution core. It executes out of that core's internal program memory buffer - which is RAM and can be reprogrammed by the "queen" independently of the PIC10 core. When you power on the cores are all blank and it's up to the queen to send instructions to the worker cores to tell them what to do - only the queen has access to flash memory to load the program segments.

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Fri Nov 27, 2015 3:03 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
The brain works such a neuron (reconfigurable) has got a "bus" (axon) with a "connector" made of a few hundreds of "pins" - synapses (reconfigurable) which connect the neuron with other neurons. The connections are also reconfigurable - so you may create/close communication lines to other neurons on the fly. The "reconfiguration" also means the way how the information is passed a) via the axon, b) via the synapse-neuron junction and c) via the neuron - the intensity, duration, speed of the signal and signal's delays are changing (and memorized). So the "programming" of the neuron's axon's or synapses' responses is not extremely difficult (and somehow known today), what is difficult is the management of the creation of the interconnections (I doubt the mechanism is known today).

If you want to build something similar you may need:
1. a 2km x 2km large pcb fully populated with female pin headers on the top side (in 2.54mm raster)
2. from the bottom side ~3billion pcs. of pic32mx (with ~200 DACs with each one)
3. a smart operator - she may use half of trillion jumper cables (you have to order various lengths), and she will reconnect the top side headers as you learn..
Sure you will get a discount at ebay.. And a volume discount from the electricity provider as well (1782 MegaWatt).
:)

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Fri Nov 27, 2015 8:11 pm 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1092
Hi All,

Modeling my brain would probably be MUCH simpler than modeling yours :).


I bet the 'CPU' chips for Pi Zero were free? Maybe factory speed culls? Also, it looks like the CPU must be a multi-chip module. DRAM and CPU in one package? Still probably a lot of fun to play with.

I keep wondering how low prices can go. Cell Phones for $10-$20 and 'MiniComputers' for $5.

I wonder who will be left when the blood bath ends?

Lots of fun.

Wiz


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Fri Nov 27, 2015 8:20 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
It seems somebody canceled a million pieces of Broadcom BCM2835 purchase, so they sell it with a huge discount :)
I wait until they give me $5 when I take it. I will order 100 pcs. then :)

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Fri Nov 27, 2015 8:23 pm 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
It also helps if you work (or worked) in Broadcom for years before setting up the Raspberry Pi foundation...

As always: it's not what you know, it's who you played soggy biscuit with in private school.

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
 Post subject: Re: Litebsd wifire
PostPosted: Fri Nov 27, 2015 8:33 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
A Pythonesque explanation.. :D :D :D

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron




Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission