#
# flash_at91.cdl
#
-# FLASH memory - Hardware support on Atmel At91/EB40
+# FLASH programming for devices with the Embedded Flash Controller
#
# ====================================================================
#####ECOSGPLCOPYRIGHTBEGIN####
## -------------------------------------------
## This file is part of eCos, the Embedded Configurable Operating System.
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2006 eCosCentric LTD
+## Copyright (C) 2006 Andrew Lunn <andrew.lunn@ascom.ch>
##
## eCos is free software; you can redistribute it and/or modify it under
## the terms of the GNU General Public License as published by the Free
##
## This exception does not invalidate any other reasons why a work based on
## this file might be covered by the GNU General Public License.
-##
-## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
-## at http://sources.redhat.com/ecos/ecos-license/
## -------------------------------------------
#####ECOSGPLCOPYRIGHTEND####
# ====================================================================
######DESCRIPTIONBEGIN####
#
-# Author(s): gthomas
+# Author(s): dmoseley
# Original data: gthomas
-# Contributors:
-# Date: 2001-07-17
+# Contributors: Andrew Lunn, Oliver Munz
+# Date: 2000-10-25
#
#####DESCRIPTIONEND####
#
# ====================================================================
cdl_package CYGPKG_DEVS_FLASH_AT91 {
- display "Atmel At91/EB40 FLASH memory support"
+ display "at91 FLASH memory support"
parent CYGPKG_IO_FLASH
active_if CYGPKG_IO_FLASH
- requires CYGPKG_HAL_ARM_AT91
implements CYGHWR_IO_FLASH_DEVICE
- implements CYGHWR_IO_FLASH_DEVICE_NOT_IN_RAM
include_dir .
- include_files ; # none _exported_ whatsoever
-
- description "FLASH memory device support for Atmel At91/EB40 boards"
+ description "FLASH memory device support for at91 EFC"
compile at91_flash.c
+
+ cdl_option CYGBLD_DEV_FLASH_AT91_LOCKING {
+ display "Support block locking"
+ default_value 1
+ implements CYGHWR_IO_FLASH_BLOCK_LOCKING
+ description "
+ The driver will implement flash block locking when this
+ option is enabled. Note that the device implements sector
+ locking, not block locking, where sectors are bigger than
+ blocks. So the sector which contains the block will be
+ locked/unlocked
- make -priority 1 {
- flash_erase_block.o: $(REPOSITORY)/$(PACKAGE)/src/flash_erase_block.c
- $(CC) -S $(INCLUDE_PATH) $(CFLAGS) -g0 -mcpu=strongarm -fno-function-sections $(REPOSITORY)/$(PACKAGE)/src/flash_erase_block.c
- echo " .globl flash_erase_block_end" >>flash_erase_block.s
- echo "flash_erase_block_end:" >>flash_erase_block.s
- $(CC) -c -o flash_erase_block.o flash_erase_block.s
- $(AR) rcs $(PREFIX)/lib/libtarget.a flash_erase_block.o
- }
- make -priority 1 {
- flash_program_buf.o: $(REPOSITORY)/$(PACKAGE)/src/flash_program_buf.c
- $(CC) -S $(INCLUDE_PATH) $(CFLAGS) -g0 -mcpu=strongarm -fno-function-sections $(REPOSITORY)/$(PACKAGE)/src/flash_program_buf.c
- echo " .globl flash_program_buf_end" >>flash_program_buf.s
- echo "flash_program_buf_end:" >>flash_program_buf.s
- $(CC) -c -o flash_program_buf.o flash_program_buf.s
- $(AR) rcs $(PREFIX)/lib/libtarget.a flash_program_buf.o
- }
- make -priority 1 {
- flash_query.o: $(REPOSITORY)/$(PACKAGE)/src/flash_query.c
- $(CC) -S $(INCLUDE_PATH) $(CFLAGS) -g0 -mcpu=strongarm -fno-function-sections $(REPOSITORY)/$(PACKAGE)/src/flash_query.c
- echo " .globl flash_query_end" >>flash_query.s
- echo "flash_query_end:" >>flash_query.s
- $(CC) -c -o flash_query.o flash_query.s
- $(AR) rcs $(PREFIX)/lib/libtarget.a flash_query.o
+ WARNING: The errata says that these lock bits only have
+ a life of 100 cycles for the AT91SAM7S devices."
}
}