RetroBSD

2.11BSD operating system for microcontrollers
It is currently Mon Sep 24, 2018 11:15 pm

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Sat Sep 12, 2015 6:08 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Hi, I've downloaded the latest fubarino 354 build from
wiki/autobuild.php
and flashed into a barebone fubarino board with pic32prog under win7. Done ok.
Now, when connecting via usb it does not recognize the fubarino.
Is the usb console set there? (Maybe you can add the board config file to the download to see how it is configured..)
Also - how to transfer the image file to the sdcard under win7 (64b)?
Thanks!
P.

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Sat Sep 12, 2015 6:34 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Ok, I've written the sdcard image with Win32DiskImager v 0.9.5 (under Win7 64b).
But still after an reset (or plugging in) the kernel LED does not show any activity and the usb is not recognized.

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Sat Sep 12, 2015 7:00 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1079
Location: Sunnyvale, CA
I just tried it myself: programmed a fubarino board with a kernel image from package retrobsd-fubarino-2015-09-09.zip. Everything works fine.

Programming:
Code:
$ pic32prog -d /dev/tty.usbmodemfa121 unix.hex
Programmer for Microchip PIC32 microcontrollers, Version 2.0.150
    Copyright: (C) 2011-2015 Serge Vakulenko
      Adapter: STK500v2 Bootloader
 Program area: 1d000000-1d1fffff
    Processor: Bootloader
 Flash memory: 2048 kbytes
  Boot memory: 80 kbytes
         Data: 154616 bytes
        Erase: done
Program flash: ###################################### done
 Verify flash: ###################################### done
 Program rate: 18068 bytes per second

Console connection:
Code:
$ kermit -c -l /dev/tty.usbmodem* -b 115200
Connecting to /dev/tty.usbmodemfa121, speed 115200
 Escape character: Ctrl-^ (ASCII 30, RS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------

2.11 BSD Unix for PIC32, revision G354 build 1:
     Compiled 2015-09-09 by root@goa.vak.ru:
     /website/retrobsd/build/retrobsd-sources/sys/pic32/fubarino
cpu: 795F512H 80 MHz, bus 80 MHz
oscillator: HS crystal, PLL div 1:2 mult x20
console: ttyUSB0 (7,0)
sd0: port SPI2, select pin RG9
sd0: type II, size 1969152 kbytes, speed 13 Mbit/sec
phys mem  = 128 kbytes
user mem  = 96 kbytes
root dev  = rd0a (0,1)
root size = 102400 kbytes
swap dev  = rd0b (0,2)
swap size = 2048 kbytes
/dev/rd0a: 744 files, 11280 used, 90719 free
Starting daemons: update cron


2.11 BSD UNIX (pic32) (console)

login: _

It's all on Mac OS X. Sorry, I don't have a Windows machine to check.


Top
 Profile  
 
PostPosted: Sat Sep 12, 2015 7:27 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
I repeated 3x :
Code:
C:\Users\pito>C:\Users\pito\Desktop\retrobsd-fubarino-2015-09-09\retrobsd-fubari
no-2015-09-09\pic32prog.exe C:\Users\pito\Desktop\retrobsd-fubarino-2015-09-09\r
etrobsd-fubarino-2015-09-09\unix.hex
Programmer for Microchip PIC32 microcontrollers, Version 2.0.157
    Copyright: (C) 2011-2015 Serge Vakulenko
      Adapter: PICkit2 Version 2.32.0
    Processor: MX795F512H
 Flash memory: 512 kbytes
  Boot memory: 12 kbytes
         Data: 154616 bytes
        Erase: done
Program flash: ###################################### done
 Verify flash: ###################################### done
 Program rate: 2063 bytes per second

C:\Users\pito>

The Busy LED does not lit on pickit2 during programming/verifying (only briefly during erase) - is that ok?
Still no kernal activity, nor usb console recognised..
BTW your pic32prog version is different.. (in the same build).. Also your MX mem params are wrong :) You did via bootloader, do you?
PS: the same with pic32prog 1.127M

Is there anybody there who can verify with win7 (64b) .. (win 93% marketshare) :)

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Sat Sep 12, 2015 7:46 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1079
Location: Sunnyvale, CA
Oh, I see... You program your fubarino using PICkit2 adapter, which is wrong. You should use the bootloader instead. Now you have damaged the bootloader, so it's better to restore it first (with PICkit2) and then program the kernel via bootloader.

(1) Download file https://raw.githubusercontent.com/chipK ... SD_1_5.hex

(2) Program it using PICkit2 adapter:
Code:
pic32prog Fubarino-SD_1_5.hex

(3) Connect Fubarino to the computer while holding the PRG button pressed. The LED will start blinking - it's a programming mode. For the Windows it will appear as a virtual COM port, line COM5 or something.

(4) Upload the kernel to the board:
Code:
pic32prog -d COM5 unix.hex


Top
 Profile  
 
PostPosted: Sat Sep 12, 2015 7:53 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
I said "barebone fubarino" :). Ok I will try again with the bootloader :)
OK bootloader has been flashed, LED blinks, but now I get STK500v2 not successfully installed, driver not found..

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Sat Sep 12, 2015 7:56 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1079
Location: Sunnyvale, CA
This kernel will not work for barebone board.
You would need to create a different configuration and build it yourself.
The autobuild server is intended to create binaries only for typical use cases.
For Fubarino it implies using a bootloader.
Actually for other listed boards as well.


Top
 Profile  
 
PostPosted: Sat Sep 12, 2015 8:12 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
So I had to download a driver from chipkit site here

http://chipkit.net/forum/viewtopic.php?t=2289

then used the stk500v2.inf file only, installed the driver by pointing win7 to that .inf file.

Flashing via bootloader:
Code:
C:\Users\pito>C:\Users\pito\Desktop\retrobsd-fubarino-2015-09-09\retrobsd-fubari
no-2015-09-09\pic32prog.exe -d COM6 C:\Users\pito\Desktop\retrobsd-fubarino-2015
-09-09\retrobsd-fubarino-2015-09-09\unix.hex
Programmer for Microchip PIC32 microcontrollers, Version 2.0.157
    Copyright: (C) 2011-2015 Serge Vakulenko
      Adapter: STK500v2 Bootloader
 Program area: 1d000000-1d1fffff
    Processor: Bootloader
 Flash memory: 2048 kbytes
  Boot memory: 80 kbytes
         Data: 154616 bytes
        Erase: done
Program flash: ###################################### done
 Verify flash: ###################################### done
 Program rate: 16292 bytes per second

C:\Users\pito>

Then finally:
Code:
2.11 BSD Unix for PIC32, revision G354 build 1:
     Compiled 2015-09-09 by root@goa.vak.ru:
     /website/retrobsd/build/retrobsd-sources/sys/pic32/fubarino
cpu: 795F512H 80 MHz, bus 80 MHz
oscillator: HS crystal, PLL div 1:2 mult x20
console: ttyUSB0 (7,0)
sd0: port SPI2, select pin RG9
sd0: type I, size 500224 kbytes, speed 13 Mbit/sec
phys mem  = 128 kbytes
user mem  = 96 kbytes
root dev  = rd0a (0,1)
root size = 102400 kbytes
swap dev  = rd0b (0,2)
swap size = 2048 kbytes
/dev/rd0a: 1327 files, 13592 used, 88407 free
Starting daemons: update cron


2.11 BSD UNIX (pic32) (console)

login: root
Password:
Welcome to RetroBSD!
#

Hmm, I am not a beginner (but maybe for too long off the retrobsd topic :) ), but spent >2h with your kind support :?

In the README I would emphasis the info on the need of the Bootloader, add info on image copy under Win7 (Win32DiskImager), info on stk500v2.inf driver install under win7, and add config file to the respective board file to see the config there (if not already there).. Still Windoze is 92% of the worldwide marketshare, OSX 6%, Linux 1.5%.

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Sat Sep 12, 2015 8:58 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1079
Location: Sunnyvale, CA
Finally it wrks for you - that's great. Thank you for your feedback.
Would you mind if I ask you to update the README file and extend it with all your findings?

Thanks,
--Serge


Top
 Profile  
 
PostPosted: Sat Sep 12, 2015 9:02 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
ok, I will send the file to you then.

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Mon Sep 14, 2015 12:48 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Here is the modded file.


Attachments:
README_Pito.rar [2.47 KiB]
Downloaded 379 times

_________________
Pukao Hats Cleaning Services Ltd.
Top
 Profile  
 
PostPosted: Mon Sep 14, 2015 6:43 pm 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1079
Location: Sunnyvale, CA
Thank you, Pito!
I've modified it a bit, to avoid the concept of 'direct flashing' as too vague.
See the result here: https://github.com/RetroBSD/retrobsd/blob/master/tools/build/skeleton/README.txt


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

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