From what I can tell in the developer guide, "//test_file" should have worked. But so should "/test_file". It says that as a special case a volume prefix by itself is interpreted as a reference to the root directory.
So, hmmm....
Chris
On Sat, Apr 8, 2023 at 3:36 PM Chris Thompson via pacsat-dev < pacsat-dev@amsat.org> wrote:
Burns, I think the initMRAM() is there. I merged your branch in. I see the function call in ConsolTask() right after the SPInit() calls for the MRAMs. But I also see a lot of MRAM errors at boot. Error 19s and Error 20s...
Corey, I tried //test_file and that did not work either.
73 Chris
On Sat, Apr 8, 2023 at 2:54 PM Burns Fisher (AMSAT) via pacsat-dev < pacsat-dev@amsat.org> wrote:
Chris, I assume that you did add the "initMRAM" near boot (right after the SPI init). If not, you may have to do format the file system after doing it because it may have the size and the partition setup wrong otherwise.
73,
Burns Fisher, WB1FJ *AMSAT(R) Engineering -- Flight Software*
On Sat, Apr 8, 2023 at 2:39 PM Corey Minyard minyard@acm.org wrote:
On Sat, Apr 08, 2023 at 02:19:29PM -0400, Chris Thompson wrote:
I tried a simple example but I can't open a file. Is there a volume
name
that I need to specify? I presume you don't need to create a
directory.
"/" should be the volume name, but maybe you need two of them? I wasn't sure from what the documentation said.
If you can open "//test_file", then that's what it is.
-corey
Here is the code, but the open fails with "No such file or directory"
// TEST File System char *test_string = "This is data"; int32_t fp; printf("FS Test: Writing:\n"); fp = red_open("/test_file", RED_O_CREAT | RED_O_WRONLY); if (fp != -1) { printf("Writing string\n"); int32_t numOfBytesWritten = red_write(fp, test_string, strlen(test_string)); if (numOfBytesWritten == strlen(test_string)) { printf("Success\n"); } else { printf("Write returned: %d\n",numOfBytesWritten); if (numOfBytesWritten == -1) printf("Unable to write to file: %s\n", red_strerror(red_errno)); } int32_t rc = red_close(fp); if (rc != 0) { printf("Unable to close file: %s\n",
red_strerror(red_errno));
} } else { printf("Unable to open file: %s\n", red_strerror(red_errno)); }
Any thoughts?
73 Chris
On Fri, Apr 7, 2023 at 5:10 PM Burns Fisher (AMSAT) via pacsat-dev < pacsat-dev@amsat.org> wrote:
I assumed that since this was ARM it was little endian.
Yeah, I would have too. But apparently ARM can go either way.
Turns out
that for some reason the automotive world seems to standardize on big endian. This has caused nothing but hassle on the TMS570 (the
STM32L is
little).
pacsat-dev mailing list -- pacsat-dev@amsat.org View archives of this mailing list at https://mailman.amsat.org/hyperkitty/list/pacsat-dev@amsat.org To unsubscribe send an email to pacsat-dev-leave@amsat.org Manage all of your AMSAT-NA mailing list preferences at https://mailman.amsat.org
-- Chris E. Thompson chrisethompson@gmail.com g0kla@arrl.net
pacsat-dev mailing list -- pacsat-dev@amsat.org View archives of this mailing list at https://mailman.amsat.org/hyperkitty/list/pacsat-dev@amsat.org To unsubscribe send an email to pacsat-dev-leave@amsat.org Manage all of your AMSAT-NA mailing list preferences at https://mailman.amsat.org
-- Chris E. Thompson chrisethompson@gmail.com g0kla@arrl.net
pacsat-dev mailing list -- pacsat-dev@amsat.org View archives of this mailing list at https://mailman.amsat.org/hyperkitty/list/pacsat-dev@amsat.org To unsubscribe send an email to pacsat-dev-leave@amsat.org Manage all of your AMSAT-NA mailing list preferences at https://mailman.amsat.org
participants (1)
-
Chris Thompson