HOME
  Security
   Software
    Hardware
  
FPGA
  CPU
   Android
    Raspberry Pi
  
nLite
  Xcode
   etc.
    ALL
  
LINK
BACK
 

2023/04/20

Arduinoの variable must be const in order to be put into read-only sectionの解決方法 Arduinoの variable must be const in order to be put into read-only sectionの解決方法

(error: in order to be put into read-only section by means of __attribute__((progmem)))

Tags: [電子工作]




● Arduinoの error: variable 'hoge_table' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

 must be const in order to be put into read-only section by means of '__attribute__((progmem))'の解決方法。

1.6 Frequently Asked Questions
 Errors related to AVR PROGMEM changes
 Q: I get an error message that says: variable 'message' must be const in order to be put into read-only section by means of '__attribute__((progmem))': char message[] PROGMEM = "Hello!";. What can I do?

 に書いてあります。

error: variable 'hoge_table' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

const char* hoge_table[4] PROGMEM = {
  "HOGE",
  "FUGA",
  "CCCC",
  "DDDD"
};
const char* hoge_table[4] PROGMEM = {
 を
const char* const hoge_table[4] PROGMEM = {
 にします。(constを2個にする)



Tags: [電子工作]

●関連するコンテンツ(この記事を読んだ人は、次の記事も読んでいます)

ESP32で東方の Bad Apple!!の動画を 128 x 64 dotの OLED SSD1306で再生する!
ESP32で東方の Bad Apple!!の動画を 128 x 64 dotの OLED SSD1306で再生する!

  ESP32で東方の Bad Apple!!の動画を再生する!実際にはパラパラ漫画です

2.4インチの大画面 OLED SSD1309で東方の Bad Apple!!の動画を再生する
2.4インチの大画面 OLED SSD1309で東方の Bad Apple!!の動画を再生する

  2.42inch 128x64 OLED LCD Display module SSD1309で Bad Apple!!を再生します

SSD1306 OLEDの描画を高速化する方法
SSD1306 OLEDの描画を高速化する方法

  How to Speed Up OLED Drawing Speed

EPS32の I2Cの SCLの周波数をクロックアップして SSD1306 OLEDの描画を高速化する方法
EPS32の I2Cの SCLの周波数をクロックアップして SSD1306 OLEDの描画を高速化する方法

  OLED SSD1306で I2Cの SCLK周波数をドーピングで高速化して描画速度を爆速にする方法

【技適付き】Freenoveの ESP32-S3-WROOMの Basic Starter Kitを買ってみた、カメラ、SD-Card付きの学習キット
【技適付き】Freenoveの ESP32-S3-WROOMの Basic Starter Kitを買ってみた、カメラ、SD-Card付きの学習キット

  Freenove Basic Starter Kit for ESP32-S3-WROOM Onboard Camera Wireless Python C FNK0084

【技適付き】Freenoveの ESP32-WROVERの Ultimate Starter Kitを買ってみた、カメラ付きの学習キット
【技適付き】Freenoveの ESP32-WROVERの Ultimate Starter Kitを買ってみた、カメラ付きの学習キット

  Freenove Ultimate Starter Kit for ESP32-WROVER Onboard Camera Wireless Python C FNK0047

LoRa通信を使用してポストに郵便物が投函されるとスマホの LINE宛に通知する IoTの作り方
LoRa通信を使用してポストに郵便物が投函されるとスマホの LINE宛に通知する IoTの作り方

  LoRaを使用した IoT郵便受け LoRa IoT Mailbox Sensor with LINE Messaging API

ESP32で Slackに「勤怠管理」メッセージをワンボタン操作で投稿する方法
ESP32で Slackに「勤怠管理」メッセージをワンボタン操作で投稿する方法

  Slackの勤怠チャンネルに毎日毎日毎日毎日 手動で投稿するのが馬鹿らしいので ESP32で作った

ESP32-S3で SPIを使う時に Arduinoでエラーが出た話
ESP32-S3で SPIを使う時に Arduinoでエラーが出た話

  ESP32 S3 SPI error VSPI was not declared in this scope

ESP32の I2Sで MCLKが必須の CS4344 DAC Audioを使用する方法
ESP32の I2Sで MCLKが必須の CS4344 DAC Audioを使用する方法

  ESP32で MCLKが必須の CS4344が問題無く使えます

ESP32で SPI接続の Color LCD ST7735S 160x80px IPSを動かす方法
ESP32で SPI接続の Color LCD ST7735S 160x80px IPSを動かす方法

  ESP32 SPI IPS Color LCD ST7735S tutorial

【ソースコード有】ESP32で I2C接続の OLED SSD1306 128x64pxを動かす方法
【ソースコード有】ESP32で I2C接続の OLED SSD1306 128x64pxを動かす方法

  ESP32 I2C OLED SSD1306 tutorial

ESP32-WROOMを購入したらヘンテコ技適マークもどきの基板が届いた話
ESP32-WROOMを購入したらヘンテコ技適マークもどきの基板が届いた話

  Fake ESP32-WROOM Ignore FCC ID and Strange TELEC mark




[HOME] | [BACK]
リンクフリー(連絡不要、ただしトップページ以外は Web構成の変更で移動する場合があります)
Copyright (c) 2023 FREE WING,Y.Sakamoto
Powered by 猫屋敷工房 & HTML Generator

http://www.neko.ne.jp/~freewing/hardware/arduino_error_1/