Hi,
I am trying to edit the variables in the initialization macros contained in the flash.h header file. I want to edit the definition for the AT25DF041A so that it uses uniform 4k sectors. When I edit the header and clean/recompile the project it does not seem to affect the program.
Can someone shed some light on what I am missing?
Thanks in Advance
Matt
Editing initialization macros for flash devices in flash.h.
-
- Active Member
- Posts: 50
- Joined: Sat Feb 13, 2010 12:04 pm
-
- Respected Member
- Posts: 275
- Joined: Fri Mar 12, 2010 6:03 pm
I understand this is query is being handled in support ticket 1716. Please do not open parallel communication channels with XMOS engineers on the same topic - it will not speed up the process (the engineer will spend more time crosschecking forums and ticketing system).
-
- Respected Member
- Posts: 275
- Joined: Fri Mar 12, 2010 6:03 pm
Sorry about my previous post, I was wrong there - this is of course not a problem with the flash library, but rather a general enquiry on using it. In that case it's perfectly fine to ask on the forums.
-
- Experienced Member
- Posts: 69
- Joined: Mon May 17, 2010 10:19 am
It's not necessary to recompile the flash library.
The versions in the header are already compiled into the libflash binary for use with the fl_connect() function. This is how the library supports devices used on XMOS development kits without additional input. Editing the header will not change the functionality of the library.
However, by using fl_connectToDevice() instead of fl_connect() you can pass in one or more flash device specification structures. The specifications in the header are provided as macros so that they be used with fl_connectToDevice() if so desired.
To use the new specification with xflash it is necessary to use the --spi-spec option so that xflash can pass it on to libflash when it writes to the device.
The versions in the header are already compiled into the libflash binary for use with the fl_connect() function. This is how the library supports devices used on XMOS development kits without additional input. Editing the header will not change the functionality of the library.
However, by using fl_connectToDevice() instead of fl_connect() you can pass in one or more flash device specification structures. The specifications in the header are provided as macros so that they be used with fl_connectToDevice() if so desired.
To use the new specification with xflash it is necessary to use the --spi-spec option so that xflash can pass it on to libflash when it writes to the device.