Commit c8827958 authored by Benoit Rat's avatar Benoit Rat

usb-loader: improve compilation with different NR value

parent f03d786a
......@@ -53,8 +53,8 @@
//------------------------------------------------------------------------------
// External definitions
//------------------------------------------------------------------------------
#ifndef AT91C_DDRC2_NR_VAL
#define AT91C_DDRC2_NR_VAL 13 //This value should be 13 for WRS3-18
#ifndef AT91C_DDRC2_NR_XX
#define AT91C_DDRC2_NR_XX AT91C_DDRC2_NR_13 /*This value should be 13 for WRS3-18*/
#endif
//------------------------------------------------------------------------------
......@@ -142,7 +142,7 @@ void BOARD_ConfigureDdram(unsigned char ddrModel, unsigned char busWidth)
// 4. Program the features of DDR2-SDRAM device into the Timing Register HDDRSDRC2_T2PR.
WRITE(pDdrc, HDDRSDRC2_CR, AT91C_DDRC2_NC_DDR10_SDR9 | // 10 column bits (1K)
AT91C_DDRC2_NR_VAL | // 13 row bits (8K)
AT91C_DDRC2_NR_XX | // 13 row bits (8K)
AT91C_DDRC2_CAS_3 | // CAS Latency 3
AT91C_DDRC2_DLL_RESET_DISABLED
); // DLL not reset
......
......@@ -24,7 +24,7 @@ compile_module()
make $2
else
#Compile the module
make CROSS_COMPILE=${CROSS_COMPILE} CHIP=at91sam9g45 BOARD=at91sam9g45-ek MEMORIES=sram TRACE_LEVEL=5 DYN_TRACES=1 DEFINES="-D__GIT__=\\\"${GITR}${GITS}\\\"" INSTALLDIR=../../
make CROSS_COMPILE=${CROSS_COMPILE} CHIP=at91sam9g45 BOARD=at91sam9g45-ek MEMORIES=sram TRACE_LEVEL=5 DYN_TRACES=1 DEFINES="-D__GIT__=\\\"${GITR}${GITS}\\\" $DEFINES" INSTALLDIR=../../
fi
}
......@@ -36,6 +36,15 @@ root="$(dirname $(pwd)/$0)"
compile_module dataflash $1
#### Compilation of extern ram module
DEFINES="-DAT91C_DDRC2_NR_XX=AT91C_DDRC2_NR_13"
compile_module extram $1
cp ${root}/../isp-extram-at91sam9g45.bin ${root}/../isp-extram-at91sam9g45-NR13.bin
DEFINES="-DAT91C_DDRC2_NR_XX=AT91C_DDRC2_NR_14"
compile_module extram $1
cp ${root}/../isp-extram-at91sam9g45.bin ${root}/../isp-extram-at91sam9g45-NR14.bin
DEFINES="-DAT91C_DDRC2_NR_XX=$1"
#### Compilation of extern ram module
compile_module extram
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment