Giter Club home page Giter Club logo

picberry's People

Contributors

akimasa avatar andreysv avatar matthewlh avatar mikedk avatar wallaceit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

picberry's Issues

Beaglebone default gpios

I was looking at your default mclr gpio for beaglebone. I am unable to locate gpio 40. Is this a typo/mistake?

chip PIC18LF46K22 is supported?

Hello, nice code. As I understand your code supports pic18fj but what about the chip PIC18LF46K22? Does it belong to any of the proposed families?
Thanks

Regarding programming PIC from raspberry pi using picberry software tool

I found the Device Libraries(.h and .cpp) which supports "PIC24FJ256GB206" in Available PIC Families "pic24fjxxxga3xx"
I had followed the installation steps of picberry using the link: https://github.com/WallaceIT/picberry
And I tried to flash the PIC board of controller "PIC24FJ256GB206" using below command and It is giving me ERROR.

root@raspberrypi:/home/pi/vendingserver/picberry# sudo picberry -w Elock2.54.X.test_release.hex
picberry PIC Programmer v0.2
Device ID: 0xffff
ERROR: unknown/unsupported device or programmer not connected.
Press ENTER to exit program mode...

Could you please tell me where i am getting wrong or please let me know how to debug this issue?
If any one tried this with other PIC controller and got the result, Please guide me.

PIC24FJ64GA1/GB0 Support?

HI,

I'm trying to determine whether this utility can work with, or be modified to work with the PIC24FJ64GA1/GB0 family of chips. relevant programming reference

Looking at the source code for the unified PIC24FJ/dspic33e families, it doesn't look like that option is compatible with the programming specification for the GA1/GB0 families...but the PIC24FJXXGA0XX code does look close to compatible, if not completely (haven't had a chance to test it yet).

My question is: in the case that they aren't completely compatible, whether or not you had any suggestions/direction in augmenting the code to make it work?

Thanks!

Beaglebone GPIO -g issue

If I use a gpio that is 3 digits then I am unable to launch Picberry. (Ex: -g 76,115,74)...upon execution I just get the picberry PIC Programmer v0.2 response and the program ends.

Program hangs if programmer not connected - PIC32

When testing picberry's operation for a PIC32MX3 family device, the program hung after printing Timeout occurred checking device status! to the terminal. Since the program never gets to this else block, it must be getting stuck in line 305.

I believe I've tracked down the issue to the pic32::GetPEResponse() function located in pic32.cpp. Specifically, the do-while loop within that function apparently waits for the Processor Access Bit to be set. If the device is not connected, however, this loop never breaks.

// Check if Processor Access bit (bit 18) is set
do {
	response = XferData(32, 0x0004c000);
} while(!( (response >> 18) & 0x01 ));

One solution to this would be to implement a timeout flag that would allow the do-while loop to break and/or return 0x00000000. Then, the function which called it could continue (with a device_id of 0x00000000) which would then return false, ultimately triggering the "ERROR: unknown/unsupported device or programmer not connected." message to be printed.


SBC used: Raspberry Pi Zero W
picberry Version: v0.2
Shell output (first line is the command used):

picberry -w ./pic.production.hex -f pic32mx3 -g 26,19,13
picberry PIC Programmer v0.2
Timeout occurred checking device status!

ERROR at address 000000: written 0200 but 0000 read!

picberry PIC Programmer v0.3
Device Name: PIC24FJ256GB106
Device ID: 0x00001019
Revision: 0x00000004
Writing chip...[[ 0%]]

ERROR at address 000000: written 0200 but 0000 read!

DONE!
Exiting program mode...

Hi,

I am facing above issue while programming using picberry, Any idea what might be wrong.

INHX32 is not fully supported

Hi,

when read_inhx() function runs it fails in checksum comparison.

e.g.:

line 2530 (35 bytes): ':0B9D20004A943366CC831D3A74E8CBF4\r\n'
byte_count = 0x0B
address = 0x9D20
record_type = 0x00 (data)
data = 0x944A @0x00004E90
data = 0x6633 @0x00004E91
data = 0x83CC @0x00004E92
data = 0x3A1D @0x00004E93
data = 0xE874 @0x00004E94
checksum = 0xCB
Error: checksum does not match. Calculated = 0xBF, Read = 0xCB

In file, checksum is supposed to be 0xF4.
In read_inhx(), checsum is computed as 0xCB.

When byte_count is odd, the for loop ignore the last char :

for(i = 0; i < byte_count/2; i++) {
nread = sscanf(&line[9+4*i], "%4hx", &data);
if (nread != 1) {
	cerr << "Error: cannot read data." << endl;
	return 0;
}
tmp = data;
data = (data >> 8) | (tmp << 8);
if (flags.debug) fprintf(stderr, "  data        = 0x%04X", data);
checksum_calculated += (data >> 8) & 0xFF;
checksum_calculated += data & 0xFF;

extended_address = ( ((uint32_t)base_address << 16) | address);
if (flags.debug)
	fprintf(stderr, " @0x%08X\n", extended_address/2+i);

mem->location[extended_address/2 + i - offset/2] = data;
mem->filled[extended_address/2 + i - offset/2] = 1;
filled_locations++;
}

A part of my hex file is :

:109D1000D4B37DFAEFC5913972E4D3BD61C29F25FA
:0B9D20004A943366CC831D3A74E8CBF4
:049D2C002BD9E150FE
:109D3000F90F23D9000ED880EE54000EED5425E221

May be I can link the code to fill 16bit location. But it does'nt seem possible with MPLAB C18.

Regards,

Marco

PIC32MZ2048 issue

After Entering Serial Execution Mode, the PIC hangs on XferInstruction 0x34050800 because the PRACC bit indicates that the processor is busy after adding in SetModes where the documentation specifies. Running without SetModes returns Error Unsupported Device... Device ID is 0x0.

Support for pic32

I would like to see support for pic32 chips especially since they aren't supported by pickit2 or any other Free tools I've found.

Support for pic24fj (PIC24FJ64GA002)

Nice work! I was finding a tool like this to program a PIC24FJ64GA002 and by chance I found your project. I saw that in theory PIC24FJ should work but I've problems trying to read the device id of a PIC24FJ64GA002 device.

picberry -e -g 66,67,60 -f pic24fj
picberry PIC Programmer v0.1
Device ID: 0x0
ERROR: unknown/unsupported device or programmer not connected.

I think your code is based on [2] but the programming specs for my chip is slightly different [1]. At the moment I tried to modify the code to adapt to [1] without luck. Any clue is welcome. Which device did you test?

[1] http://ww1.microchip.com/downloads/en/DeviceDoc/39768d.pdf
[2] http://ww1.microchip.com/downloads/en/DeviceDoc/30010057d.pdf

compilation fails

had to mkdir -p build/devices and change g++-4.7 to g++-4.9 in the makefile

even so, compilation fails at

src/gpio_test.cpp:93:93: error: expression cannot be used as a function
cout << "BASE ADDRESS " << hex << GPIO_BASE << " + OFFSET " << hex << OFFSET(tested_gpio) << " = FINAL ADDRESS " << hex << GPIO_BASE + OFFSET(tested_gpio) << endl;

(bold for emphasis mine)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.