1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ATOMS3R のPSRAMをPlatformIOから使いたい

Posted at

少し前に入手していた M5AtomS3R というデバイスがあります。

これの前機種に当たる M5AtomS3 がとても使いやすく愛用しています。なのでPSRAM搭載版と聞いて喜び勇んで買ってみたのですが、肝心のPSRAMをPlatformIOからサクッと使うことができませんでした…
ネット検索してもピンポイントな情報を見つけられなかったのですが、ヒントになるいくつかのX投稿のおかげで何とかビルド&実行できるようになりました。ありがとうございました。


キモは platformio.ini でした。次にPSRAMを触りたくなったとき、またネット検索しなくても済むように、GitHubにサンプルプロジェクト一式を入れておきました。
https://github.com/tarmn3/AtomS3R_PSRAM_simple_sample
(用意した2枚のPNGをPSRAMに入れて、ボタン押すたびに切り替える単純なサンプルコードです)

でも、いちいちリポジトリ覗かなくてもいいように貼っておきます。

[env:m5stack-atoms3r]
platform    = espressif32
board       = m5stack-atoms3
framework   = arduino

; ファイルシステム
board_build.filesystem = littlefs

; PSRAM 有効化
board_build.arduino.memory_type = qio_opi
board_build.flash_mode         = qio
board_build.psram_type         = opi

build_flags =
  -DESP32S3
  -DBOARD_HAS_PSRAM
  -mfix-esp32-psram-cache-issue
  -DARDUINO_USB_CDC_ON_BOOT=1      ; USB CDC を起動時から有効化
  -DARDUINO_USB_MODE=1             ; USB シリアルポートを使う
  -DCORE_DEBUG_LEVEL=5

lib_deps =
  m5stack/M5Unified@0.2.7          ; 0.2.8 は動作未確認
  m5stack/M5GFX

(公式の iniファイルそのままで動かなかったのが謎のまま… 誰か教えてください…)

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?