forked from wolfSSL/wolfssl
update util_lib CodeWarrior project files
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -7,52 +7,7 @@
|
|||||||
<buildSpec>
|
<buildSpec>
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||||
<triggers>clean,full,incremental,</triggers>
|
|
||||||
<arguments>
|
<arguments>
|
||||||
<dictionary>
|
|
||||||
<key>?name?</key>
|
|
||||||
<value></value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
|
||||||
<value>true</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
|
||||||
<value>-j6</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
|
||||||
<value>${system:ECLIPSE_HOME}/../gnu/bin/mingw32-make</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
|
||||||
<value>${ProjDirPath}/twrk70f120m_Int_Flash_SramData_Debug</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.contents</key>
|
|
||||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
|
||||||
<value>false</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
|
||||||
<value>true</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
|
||||||
<value>true</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
|
||||||
<value>true</value>
|
|
||||||
</dictionary>
|
|
||||||
<dictionary>
|
|
||||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
|
||||||
<value>true</value>
|
|
||||||
</dictionary>
|
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
@ -70,7 +25,7 @@
|
|||||||
<variableList>
|
<variableList>
|
||||||
<variable>
|
<variable>
|
||||||
<name>MQX_ROOT_DIR</name>
|
<name>MQX_ROOT_DIR</name>
|
||||||
<value>file:/C:/Freescale/Freescale%20MQX%203.8</value>
|
<value>file:/C:/Freescale/Freescale_MQX_4_1</value>
|
||||||
</variable>
|
</variable>
|
||||||
</variableList>
|
</variableList>
|
||||||
</projectDescription>
|
</projectDescription>
|
||||||
|
@ -2,8 +2,11 @@
|
|||||||
|
|
||||||
#include <mqx.h>
|
#include <mqx.h>
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <mfs.h>
|
|
||||||
#include <fio.h>
|
#include <fio.h>
|
||||||
|
#include <mfs.h>
|
||||||
|
#include <sdcard.h>
|
||||||
|
#include <spi.h>
|
||||||
|
#include <part_mgr.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
@ -43,10 +46,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int sdcard_open(MQX_FILE_PTR *com_handle, MQX_FILE_PTR *sdcard_handle,
|
int sdcard_open(MQX_FILE_PTR *com_handle, MQX_FILE_PTR *sdcard_handle,
|
||||||
MQX_FILE_PTR *partman_handle, MQX_FILE_PTR *filesystem_handle,
|
MQX_FILE_PTR *partman_handle, MQX_FILE_PTR *filesystem_handle,
|
||||||
char *partman_name, char *filesystem_name)
|
char *partman_name, char *filesystem_name)
|
||||||
{
|
{
|
||||||
|
|
||||||
_mqx_int error_code;
|
_mqx_int error_code;
|
||||||
_mqx_uint param;
|
_mqx_uint param;
|
||||||
|
|
||||||
@ -59,7 +61,7 @@ int sdcard_open(MQX_FILE_PTR *com_handle, MQX_FILE_PTR *sdcard_handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Install SD card device */
|
/* Install SD card device */
|
||||||
error_code = _io_sdcard_install("sdcard:", (pointer) &_bsp_sdcard0_init,
|
error_code = _io_sdcard_install("sdcard:", (void *)&_bsp_sdcard0_init,
|
||||||
*com_handle);
|
*com_handle);
|
||||||
if (error_code != MQX_OK) {
|
if (error_code != MQX_OK) {
|
||||||
printf("Error installing SD card device (0x%x)\n", error_code);
|
printf("Error installing SD card device (0x%x)\n", error_code);
|
||||||
@ -79,7 +81,7 @@ int sdcard_open(MQX_FILE_PTR *com_handle, MQX_FILE_PTR *sdcard_handle,
|
|||||||
error_code = _io_part_mgr_install(*sdcard_handle, partman_name, 0);
|
error_code = _io_part_mgr_install(*sdcard_handle, partman_name, 0);
|
||||||
if (error_code != MFS_NO_ERROR) {
|
if (error_code != MFS_NO_ERROR) {
|
||||||
printf("Error installing partition manager: %s\n", MFS_Error_text(
|
printf("Error installing partition manager: %s\n", MFS_Error_text(
|
||||||
(uint_32) error_code));
|
(uint32_t) error_code));
|
||||||
return -63;
|
return -63;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +90,7 @@ int sdcard_open(MQX_FILE_PTR *com_handle, MQX_FILE_PTR *sdcard_handle,
|
|||||||
if (*partman_handle == NULL) {
|
if (*partman_handle == NULL) {
|
||||||
error_code = ferror(*partman_handle);
|
error_code = ferror(*partman_handle);
|
||||||
printf("Error opening partition manager: %s\n", MFS_Error_text(
|
printf("Error opening partition manager: %s\n", MFS_Error_text(
|
||||||
(uint_32) error_code));
|
(uint32_t) error_code));
|
||||||
return -64;
|
return -64;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +102,7 @@ int sdcard_open(MQX_FILE_PTR *com_handle, MQX_FILE_PTR *sdcard_handle,
|
|||||||
error_code = _io_mfs_install(*partman_handle, filesystem_name, param);
|
error_code = _io_mfs_install(*partman_handle, filesystem_name, param);
|
||||||
if (error_code != MFS_NO_ERROR) {
|
if (error_code != MFS_NO_ERROR) {
|
||||||
printf("Error initializing MFS over partition: %s\n",
|
printf("Error initializing MFS over partition: %s\n",
|
||||||
MFS_Error_text((uint_32) error_code));
|
MFS_Error_text((uint32_t) error_code));
|
||||||
return -65;
|
return -65;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,7 +112,7 @@ int sdcard_open(MQX_FILE_PTR *com_handle, MQX_FILE_PTR *sdcard_handle,
|
|||||||
(_file_size) 0);
|
(_file_size) 0);
|
||||||
if (error_code != MFS_NO_ERROR) {
|
if (error_code != MFS_NO_ERROR) {
|
||||||
printf("Error initializing MFS: %s\n", MFS_Error_text(
|
printf("Error initializing MFS: %s\n", MFS_Error_text(
|
||||||
(uint_32) error_code));
|
(uint32_t) error_code));
|
||||||
return -66;
|
return -66;
|
||||||
}
|
}
|
||||||
} /* end Validate partition 1 */
|
} /* end Validate partition 1 */
|
||||||
@ -120,7 +122,7 @@ int sdcard_open(MQX_FILE_PTR *com_handle, MQX_FILE_PTR *sdcard_handle,
|
|||||||
error_code = ferror(*filesystem_handle);
|
error_code = ferror(*filesystem_handle);
|
||||||
if ((error_code != MFS_NO_ERROR) && (error_code != MFS_NOT_A_DOS_DISK)) {
|
if ((error_code != MFS_NO_ERROR) && (error_code != MFS_NOT_A_DOS_DISK)) {
|
||||||
printf("Error opening filesystem: %s\n", MFS_Error_text(
|
printf("Error opening filesystem: %s\n", MFS_Error_text(
|
||||||
(uint_32) error_code));
|
(uint32_t) error_code));
|
||||||
return -67;
|
return -67;
|
||||||
}
|
}
|
||||||
if (error_code == MFS_NOT_A_DOS_DISK) {
|
if (error_code == MFS_NOT_A_DOS_DISK) {
|
||||||
|
Reference in New Issue
Block a user