###前提・実現したいこと
SWITCH SCIENCE社 ESPrⓇDeveloper32(以下ESPr)を「ESP-IDF」を使用して開発をしています。
ESPrを使用して、PCのCドライブ内にテキストファイルの書き込みを行う必要があったので、
サンプルプログラム「hello_world」を改造して実行してみたところ、エラーが発生して書き込みが行えませんでした。
プログラムの不足などがあったらご指摘よろしくお願いします。
まだ勉強をし始めたばかりで至らない点もあるとは思いますが、よろしくお願いいたします。
###発生している問題・エラーメッセージ
Guru Meditation Error of type LoadProhibited occurred on core 0. Exception was unhandled. PC : 0x400d1d74 PS : 0x00060b30 A0 : 0x800d1e04 A1 : 0x3ffb35b0 0x400d1d74: _fwrite_r at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/ne wlib/libc/stdio/../../../.././newlib/libc/stdio/fwrite.c:168 A2 : 0x3ffaf724 A3 : 0x00000009 A4 : 0x00000001 A5 : 0x00000009 A6 : 0x00000000 A7 : 0x00060023 A8 : 0x3ff96458 A9 : 0x3ffb35b0 A10 : 0x3ffaf6c0 A11 : 0x3f401c68 A12 : 0x00000209 A13 : 0x000001b6 A14 : 0x00000061 A15 : 0x0000002b SAR : 0x00000000 EXCCAUSE: 0x0000001c EXCVADDR: 0x00000064 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffff6 Backtrace: 0x400d1d74:0x3ffb35b0 0x400d1e01:0x3ffb35f0 0x400d169d:0x3ffb3610 0x400d05f3:0x3ffb3630 0x400d1d74: _fwrite_r at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/ne wlib/libc/stdio/../../../.././newlib/libc/stdio/fwrite.c:168 0x400d1e01: fwrite at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newli b/libc/stdio/../../../.././newlib/libc/stdio/fwrite.c:211 0x400d169d: app_main at C:/msys32/home/hello_world/main/hello_world_main.c:23 0x400d05f3: main_task at C:/msys32/home/esp/esp-idf/components/esp32/cpu_start.c:349
###該当のソースコード
#include <stdio.h> #include <stdlib.h> #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "esp_system.h" #include "esp_spi_flash.h" void app_main() { FILE *file; file = fopen("c://msys32//home//Data//Helloworld.txt", "a"); fprintf(file, "HelloWorld\r\n"); fclose(file); }
###試したこと
make menuconfigでポートの指定をした後に、
make flashでコンパイルを行っています。
###補足情報(言語/FW/ツール等のバージョンなど)
PC:Windows8.1 64bit
開発環境:ESP-IDF
ソフト:MSYS2
あなたの回答
tips
プレビュー