index c8847eef1bdb162e8b537a47bd6ded23d79e399d..e8a5db5e0f2abe3d98713ca0bf9fd673ad1bd8ba 100644 (file)
#include <string.h>
#include "platform.h"
#include "types.h"
-#include "ti/csl/csl_semAux.h"
/* NOR writer utility version */
-char version[] = "01.00.00.02";
+char version[] = "01.00.00.03";
/* The input file name is hard coded */
char *input_file = "nor_writer_input.txt";
void Osal_platformSpiCsEnter(void)
{
- /* Get the hardware semaphore.
- *
- * Acquire Multi core CPPI synchronization lock
- */
- while ((CSL_semAcquireDirect (3)) == 0);
-
return;
}
void Osal_platformSpiCsExit (void)
{
- /* Release the hardware semaphore
- *
- * Release multi-core lock.
- */
- CSL_semReleaseSemaphore (3);
-
return;
}
)
{
char line[MAX_LINE_LENGTH];
- char tokens[] = " :=;\n";
+ char tokens[] = " :=;\n\r";
char *key, *data;
memset(line, 0, MAX_LINE_LENGTH);
/* Initialize main Platform lib */
memset(&init_config, 0, sizeof(platform_init_config));
memset(&init_flags, 1, sizeof(platform_init_flags));
+ init_flags.pll = 0;
+ init_flags.ddr = 0;
+ init_flags.phy = 0;
if (platform_init(&init_flags, &init_config) != Platform_EOK)
{
printf ("Platform init failed!\n");
print_platform_errno();
return;
}
-
+#if !(defined(_EVMC6657L_))
p_device = platform_device_open(PLATFORM_DEVID_NORN25Q128, 0);
+#else
+ p_device = platform_device_open(PLATFORM_DEVID_NORN25Q032A, 0);
+#endif
if (p_device == NULL)
{
printf ("NOR device open failed!\n");
/* Parse the CCS format file */
ret = find_file_length(fp);
fclose (fp);
+
+ norWriterInfo.writeBytes += norWriterInfo.blockSizeBytes - 1;
+ norWriterInfo.writeBytes -= norWriterInfo.writeBytes % norWriterInfo.blockSizeBytes;
+
if (ret == FALSE)
{
printf("Error in parsing CCS file %s\n", norWriterInfo.file_name);