Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SomeUser

Pages: [1]
1
I still seem to have a Problem.

Let's for now ignore the Emulated fat.


I feel pretty stupid by now,
but I seem to be unable to figure out, as simple as it should be,
how to access the files on the MSD in my code on the microcontroller side.

So if I connect the board to the computer, the K64F shows up as a 512KiB MSD.
Now I format it (using the computer), and put a set of txt files in folders on it.

Let's assume:
Code: [Select]
H:.
????Log files
?       Log2017-12-19.txt
?       Log2017-12-20.txt
?       Log2017-12-18.txt
?       Log2017-12-21.txt
?       Log2017-12-17.txt
?
????Alternative configuration
?       Conf2.txt
?       Conf0.txt
?       Conf1.txt
?
????Default configuration
        Conf2.txt
        Conf0.txt
        Conf1.txt

How would I access those files in code on the microcontroller side?

2
µTasker general / Re: Utasker Simulator 1.4 not compiling (mbedtls)
« on: December 19, 2017, 12:29:30 AM »
Wow, I'm impressed by
how fast you responded!  :D

That solved my problem indeed.
Thank you very much!

Sorry for not figuring it out on my own.  :-[

3
Hello, I would like to write an application using the internal storage of the K64F (512KiB, or even better 768KiB if possible) as USB MSD.

The intended use is for the user to move files to the MSD, which the program will then use.


Enabling USB MSD compiles okay it seems, but setting

Code: [Select]
//#define SDCARD_SUPPORT                                                 // SD-card interface
#define FLASH_FAT                                                      // FAT in internal flash
//#define SPI_FLASH_FAT                                                  // FAT in external SPI flash
#define FAT_EMULATION

Does not compile.
I get:
Code: [Select]
Building file: ../uTasker/utFAT/mass_storage.c
Invoking: Cross ARM C Compiler
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall  -g -D_KINETIS -D_KDS -D_GNU -I"[i]removed[/i]" -std=c99 -MMD -MP -MF"uTasker/utFAT/mass_storage.d" -MT"uTasker/utFAT/mass_storage.o" -c -o "uTasker/utFAT/mass_storage.o" "../uTasker/utFAT/mass_storage.c"
../uTasker/utFAT/mass_storage.c: In function 'fnMassStorage':
../uTasker/utFAT/mass_storage.c:2061:32: error: 'DISK_EM_FAT' undeclared (first use in this function)
             if (iDiskNumber == DISK_EM_FAT) {
                                ^
../uTasker/utFAT/mass_storage.c:2061:32: note: each undeclared identifier is reported only once for each function it appears in
../uTasker/utFAT/mass_storage.c:2072:17: error: continue statement not within a loop
                 continue;
                 ^
../uTasker/utFAT/mass_storage.c: In function 'fnGetDataPointer':
../uTasker/utFAT/mass_storage.c:7380:14: error: 'DISK_EM_FAT' undeclared (first use in this function)
     iDisk -= DISK_EM_FAT;
              ^
../uTasker/utFAT/mass_storage.c: In function 'fnGenerateFAT':
../uTasker/utFAT/mass_storage.c:7403:46: error: 'DISK_EM_FAT' undeclared (first use in this function)
     int iDisk = (ptr_utDisk->ucDriveNumber - DISK_EM_FAT);
                                              ^
../uTasker/utFAT/mass_storage.c: In function 'fnReadEmulatedSector':
../uTasker/utFAT/mass_storage.c:7562:18: error: 'DISK_EM_FAT' undeclared (first use in this function)
         iDisk -= DISK_EM_FAT;
                  ^
../uTasker/utFAT/mass_storage.c: At top level:
../uTasker/utFAT/mass_storage.c:7610:12: error: redefinition of 'fnReadSector'
 extern int fnReadSector(unsigned char ucDisk, unsigned char *ptrBuffer, unsigned long ulSectorNumber)
            ^
../uTasker/utFAT/mass_storage.c:7226:12: note: previous definition of 'fnReadSector' was here
 extern int fnReadSector(unsigned char ucDisk, unsigned char *ptrBuffer, unsigned long ulSectorNumber)
            ^
../uTasker/utFAT/mass_storage.c:7618:12: error: redefinition of 'fnWriteSector'
 extern int fnWriteSector(unsigned char ucDisk, unsigned char *ptrBuffer, unsigned long ulSectorNumber)
            ^
../uTasker/utFAT/mass_storage.c:7263:12: note: previous definition of 'fnWriteSector' was here
 extern int fnWriteSector(unsigned char ucDisk, unsigned char *ptrBuffer, unsigned long ulSectorNumber)
            ^
../uTasker/utFAT/mass_storage.c: In function 'fnPrepareRootDirectory':
../uTasker/utFAT/mass_storage.c:7679:50: error: 'DISK_EM_FAT' undeclared (first use in this function)
         int iDisk = (ptr_utDisk->ucDriveNumber - DISK_EM_FAT);
                                                  ^
../uTasker/utFAT/mass_storage.c: At top level:
../uTasker/utFAT/mass_storage.c:7849:22: error: redefinition of 'fnGetDiskInfo'
 extern const UTDISK *fnGetDiskInfo(unsigned char ucDisk)
                      ^
../uTasker/utFAT/mass_storage.c:7275:22: note: previous definition of 'fnGetDiskInfo' was here
 extern const UTDISK *fnGetDiskInfo(unsigned char ucDisk)
                      ^
../uTasker/utFAT/mass_storage.c:1578:20: warning: 'fnReadPartialEmulatedSector' used but never defined [enabled by default]
         static int fnReadPartialEmulatedSector(UTDISK *ptr_utDisk, unsigned long ulSector, void *ptrBuf, unsigned short usOffset, unsigned short usLength);
                    ^
uTasker/utFAT/subdir.mk:18: recipe for target 'uTasker/utFAT/mass_storage.o' failed
make: *** [uTasker/utFAT/mass_storage.o] Error 1

Is there a specific way I can accomplish my goal easily?
And is the source code for the
USB-MSD with SD card, internal Flash disk and external SPI-Flash disk
example on the Kinetis landing page available (So I can strip out the SD-Card and SPI-Flash code)?

4
µTasker general / Utasker Simulator 1.4 not compiling (mbedtls)
« on: December 18, 2017, 03:46:57 PM »
Hello, following the getting started section of the following document
http://www.utasker.com/docs/KINETIS/uTaskerV1.4_Kinetis.pdf
I seem to be unable to get the simulator to compile.

Using visual studio 2017 community edition I get the following errors:

Code: [Select]
Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol _mbedtls_calloc uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\x509.obj 1
Error LNK2001 unresolved external symbol _mbedtls_calloc uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\x509_crt.obj 1
Error LNK2001 unresolved external symbol _mbedtls_calloc uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\pk_wrap.obj 1
Error LNK2001 unresolved external symbol _mbedtls_calloc uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\rsa.obj 1
Error LNK2001 unresolved external symbol _mbedtls_calloc uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\sha256.obj 1
Error LNK2001 unresolved external symbol _mbedtls_calloc uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\ssl_tls.obj 1
Error LNK2001 unresolved external symbol _mbedtls_calloc uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\ecp.obj 1
Error LNK2001 unresolved external symbol _mbedtls_calloc uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\md.obj 1
Error LNK2001 unresolved external symbol _mbedtls_calloc uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\md_wrap.obj 1
Error LNK2001 unresolved external symbol _mbedtls_calloc uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\pem.obj 1
Error LNK2001 unresolved external symbol _mbedtls_calloc uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\asn1parse.obj 1
Error LNK2001 unresolved external symbol _mbedtls_calloc uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\asn1write.obj 1
Error LNK2001 unresolved external symbol _mbedtls_calloc uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\bignum.obj 1
Error LNK2001 unresolved external symbol _mbedtls_calloc uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\cipher_wrap.obj 1
Error LNK2001 unresolved external symbol _mbedtls_free uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\x509_crt.obj 1
Error LNK2001 unresolved external symbol _mbedtls_free uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\pk_wrap.obj 1
Error LNK2001 unresolved external symbol _mbedtls_free uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\rsa.obj 1
Error LNK2001 unresolved external symbol _mbedtls_free uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\sha256.obj 1
Error LNK2001 unresolved external symbol _mbedtls_free uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\ssl_tls.obj 1
Error LNK2001 unresolved external symbol _mbedtls_free uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\ecp.obj 1
Error LNK2001 unresolved external symbol _mbedtls_free uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\md.obj 1
Error LNK2001 unresolved external symbol _mbedtls_free uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\md_wrap.obj 1
Error LNK2001 unresolved external symbol _mbedtls_free uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\pem.obj 1
Error LNK2001 unresolved external symbol _mbedtls_free uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\asn1parse.obj 1
Error LNK2001 unresolved external symbol _mbedtls_free uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\asn1write.obj 1
Error LNK2001 unresolved external symbol _mbedtls_free uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\bignum.obj 1
Error LNK2001 unresolved external symbol _mbedtls_free uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\cipher_wrap.obj 1
Error LNK2001 unresolved external symbol _mbedtls_snprintf uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\oid.obj 1
Error LNK2001 unresolved external symbol _mbedtls_snprintf uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\x509.obj 1
Error LNK2001 unresolved external symbol _mbedtls_snprintf uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\x509_crt.obj 1
Error LNK1120 3 unresolved externals uTaskerKinetis .\uTasker-GIT-Kinetis\Applications\uTaskerV1.4\Simulator\uTasker___Win32_uTasker_Kinetis_plus_GCC_build\uTaskerKinetis.exe 1

Pages: [1]