|
From: David K. <da...@em...> - 2012-01-14 13:53:40
|
Yes, /platform/avr-raven/apps/raven-webserver/Makefile.raven-webserver should be passing EEMEM to makefsdata. Obviously that has never been tested, because not much of a webserver will fit in the 4KB eeprom. The coffee file system itself was working on eeprom though, passing the tests after a startup formatting. I don't use avrdude so cant help you there. I use the .elf file with AVR studio 4. avr-size will show the eeprom size from the .elf file $ avr-size -C --mcu atmega1284p webserver6-avr-raven.elf AVR Memory Usage ---------------- Device: atmega1284p Program: 61120 bytes (46.6% Full) (.text + .data + .bootloader) Data: 12038 bytes (73.5% Full) (.data + .bss + .noinit) EEPROM: 63 bytes (1.5% Full) (.eeprom) -----Original Message----- From: Ralph Zuidinga Sent: Friday, January 13, 2012 6:26 PM To: con...@li... Subject: [Contiki-developers] CFS EEPROM issue Hi, I have read the Coffee Filesystem (CFS) Guide on the Wiki http://www.sics.se/contiki/wiki/index.php/Coffee_Filesystem_Guide Used hardware: AVR Raven Used software: Contiki git branch 2.5.x ( I’m (trying) to create a pre-initialized CFS. I want to store the CFS in EEPROM. Therefore I added the line COFFEE_FILES=2 to my Makefile. I successfully used the makefsdata Perl script, compiled and linked my application. When make is finished I have 1 ELF file. The ELF file contains both, EEPROM and FLASH of the firmware in one file. I’m using Ubuntu Linux. If I’m correct Avrdude does not support this format, therefore the ELF file must be split into EEPROM part and the FLASH part. I used the following command: avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom="alloc,load" change-section-lma .eeprom=0 $(OUTFILE).elf $(OUTFILE).eep The above command produces the following warning: avr-objcopy: --change-section-lma .eeprom=0x00000000 never used. And the problem I’m having is that the resulting .eep file is too small (only 13 bytes) while my WEBDIR contains +/- 8 KiB. How can I create a correct .eep file? Second problem: When I use COFFEE_FILES=1 the source file created by makefsdata does not compile. I get the following error: coffee-fsdata.c:801:55: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘EEPROM’. The same error is also displayed for line number 802, 803 and 804. Line number 801 contains: const struct httpd_fsdata_file file_wsdl_xml[] EEPROM ={{ NULL, (const char *)0x0008, (const char *)0x0018, 4377}}; I’m a beginner with C programming, but if I’m correct EEPROM should be replaced with EEMEM, correct? If so, this must be corrected in the makefsdata Perl script. Thanks in advance, Ralph Zuidinga rzu...@el... 7 |