Page 1 of 1

Difficulty flashing PCAN Router Pro

Posted: Wed 2. Nov 2016, 19:37
by slagernate
Hi,

I have a PCAN-Router Pro that I've successfully flashed with example projects. However, I have my own project which has a few files (one being a common data types file... not sure if that's affecting something). It compiled just fine but whenever I try to flash the router I get an error that says:

"Programming module
Unable to find or calculate CRC-Entries in binary data file!"

If I set the CRC mode to No CRC, then I get an error that says:

"Programming module
Binary data file not supported from Hardware!"

I'm using Yagarto to compile my project, and PCAN-Flash with a PCAN-USB device to program the board. When I compile I get a few "incompatible pointer type" warnings, but I think those are just because I have some typedefs that are confusing the compiler. The latter portion of the output to my compile is:

Creating bin file output.bin
cp output.hex temp.hex
hex2bin -s 0000 temp.hex
hex2bin v1.0.9, Copyright (C) 2012 Jacques Pelletier
checksum extensions Copyright (C) 2004 Rockwell Automation
improved P.G. 2007, modified Danny Schneider,2012

Lowest address = 00002000
Highest address = 0003DF0B
Pad Byte = FF
8-bit Checksum = E7
rm -f temp.hex
cp temp.bin output.bin
rm -f temp.bin

Size after:
output.elf :
section size addr
.text 15184 8192
.data 216 1073741824
.C2F_Info 12 253696
.bss 1900 1073742040
.stack 804 1073743940
.extram 0 2147483648
.comment 127 0
.ARM.attributes 46 0
.debug_aranges 320 0
.debug_info 11726 0
.debug_abbrev 2691 0
.debug_line 2185 0
.debug_frame 1920 0
.debug_str 5611 0
.debug_loc 4036 0
.debug_ranges 16 0
Total 46794

Is that too large?

Let me know what other information I can provide. Thank you for your advice and time!

Nate

Re: Difficulty flashing PCAN Router Pro

Posted: Thu 3. Nov 2016, 15:49
by P.Steil
Hello,

we recommend to use one of the example projects as a starting point. You can add your code
to the example and extend it that way. The examples will include MCU and module specific
code for low level initialization, checksum descriptors, PCANFlash specific identifiers and so on.
All the low level code, linker script a.s.o. should be used as is.

Regards