• Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About r2k-in-the-vortex

  • Rank
  1. r2k-in-the-vortex

    Horrible bugs in AVR8_Examples>Port_Blink project

    well i think working example should be available somewhere, imho arduino software platform just isnt viable for much more than blinking leds, but if you can write c straight to soft processor on fpga.. thats useful. most soft processors out there would need you to write your own memories and periherals, and sometimes only way to write code for them is assembler. in that regard avr8 is a great way to implement all sorts of procedural problems on fpga that are not very speed sensitive, eg user interfaces etc that would require unreasonable complexity without a soft processor next thing on my tasklist is to try and get UDP running on my board, will see how that goes
  2. r2k-in-the-vortex

    Horrible bugs in AVR8_Examples>Port_Blink project

    well, i found it here http://gadgetforge.gadgetfactory.net/gf/project/avr_core/frs/?action=FrsReleaseBrowse&frs_package_id=7 theres a port_blink project in that archive, seems like you are the author of the main.c but there is no mention of your name in the makefile where the bugs are, nevertheless, i hope it gets fixed, i wouldnt want anyone else spending days digging trough machine code and processor intestines to find these bugs(tho it was educational) on a good note after i got these bugs sorted out things started going real smooth, i got a rotary encoder input working and attached to the avr8 and even managed to write an spi interface for it and control ADF4350(RF frequency syntesizer 137.5 - 4400MHz) eval board with avr8, little more and i have a sine signal generator with lcd that i can tune from a rotary knob http://uk.farnell.com/analog-devices/eval-adf4350eb1z/board-eval-for-adf4350/dp/1984805
  3. the project might work fine as it is, but anyone who tries to write bigger programs based on that project is in for a world of shit that was the case for me atleast bug/feature 1) there is -nostartfiles flag in the makefile, meaning compiler will not write the interrupt table, on one hand it results in smaller code, on the other..... there is never a call for function main(), sure its fine if main is the only function there is, it just runs through the c setup loops and ends up in the first function in the machine code, problem is, if you add functions, main() in not nessecerily the first function in machine code...... in fact avr-gcc seems to put the main() as the last function the flag should be cleared bug 2) there is -Line_Length 100000000 flag for srec_cat, for generating the .mem file, what it should do is write the entire code in one line as long as its shorter than 100000000 bytes, in fact srec_cat defaults to 255 byte lines if the -Line_Length parameter is bigger than 255, so that results in odd number of bytes per line, last instruction on line 0 is cut in half, first byte on line0 second byte on line1, now data2mem reads 2 bytes at a time when generating prog_mem_init.vhd, and the last byte on line0 in .mem file just goes missing, and thus all instructions after 0xfe are garbage, -Line_Length should be set to something reasonable eg 80, it works fine then took me quite some time to figure these bugs out, but as an end result i managed to port avr8 to Xiling spartan3e1600e and run it on my dev board and control character lcd with it http://www.digilenti...93&Prod=S3E1600 http://no.life.ee/ra...n_xc3s1600e.jpg