Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined reference to `flash_read' #9

Closed
biergaizi opened this Issue Apr 10, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@biergaizi
Copy link

biergaizi commented Apr 10, 2019

I'm attempting to build a parallel EEPROM flasher using this guide, Prototype RS232 AVR parallel flash programmer. I made the following change to enable parallel EEPROM support.

diff --git a/frser-cfg.h b/frser-cfg.h
index ef92d24..c5c8fae 100644
--- a/frser-cfg.h
+++ b/frser-cfg.h
@@ -3,9 +3,9 @@
 
 /* What kind of buses your flasher supports. I assume if it can LPC it can FWH too. */
 /* You can override that with FORCE_BUSTYPE if you cant (weirdo hardware duuude :P) */
-//#define FRSER_FEAT_PARALLEL
+#define FRSER_FEAT_PARALLEL
 //#define FRSER_FEAT_LPCFWH
-#define FRSER_FEAT_SPI
+//#define FRSER_FEAT_SPI
 
 /* Debug feature, if you want to use get_last_op to know the last frser operation. */
 //#define FRSER_FEAT_LAST_OP
@@ -22,7 +22,7 @@
 #define FRSER_NAME "frser-duino"
 
 /* Attached address lines, only if FRSER_FEAT_PARALLEL */
-//#define FRSER_PARALLEL_BITS 19
+#define FRSER_PARALLEL_BITS 19
 
 /* Ability to set SPI frequency (only if SPI). */
 #define FRSER_FEAT_SPISPEED

Unfortunately, it causes a link-time error.

avr-gcc -mmcu=atmega328p -DBAUD=115200 -Os -fno-inline-small-functions -fno-tree-switch-conversion -frename-registers -g -Wall -W -pipe -flto -fwhole-program -std=gnu99  -Ilibfrser -std=gnu99 -I. -o frser-duino.out main.c uart.c spihw.c libfrser/frser.c libfrser/udelay.c libfrser/spilib.c libfrser/spihw_avrspi.c
/usr/libexec/gcc/avr/ld: /tmp/cckuyO08.ltrans0.ltrans.o: in function `uart_send':
/home/gaizi/Code/frser-duino/uart.c:85: undefined reference to `flash_read'
/usr/libexec/gcc/avr/ld: /tmp/cckuyO08.ltrans0.ltrans.o: in function `do_cmd_opbuf':
/home/gaizi/Code/frser-duino/libfrser/frser.c:231: undefined reference to `flash_readn'
/usr/libexec/gcc/avr/ld: /tmp/cckuyO08.ltrans0.ltrans.o: in function `__vector_18':
/home/gaizi/Code/frser-duino/uart.c:47: undefined reference to `flash_write'
/usr/libexec/gcc/avr/ld: /home/gaizi/Code/frser-duino/uart.c:52: undefined reference to `flash_read'
/usr/libexec/gcc/avr/ld: /home/gaizi/Code/frser-duino/uart.c:52: undefined reference to `flash_read'
collect2: error: ld returned 1 exit status
make: *** [Makefile:62: frser-duino.out] Error 1

Apparently, it seems the parallel code is less-tested than the SPI code. What is the correct procedure to enable parallel EEPROM programming?

Also, is the information presented in the aforementioned guide still accurate? Or has the wiring has been changed in these years? I didn't find any documentation from the source code.

@urjaman

This comment has been minimized.

Copy link
Owner

urjaman commented Apr 10, 2019

This is quite obvious because there is no parallel support in this repo :D

If you want the code that drove that ancient parallel flasher, look there:
https://github.com/urjaman/frser-atmega88

@urjaman urjaman closed this Apr 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.