LoginSignup
2
1

More than 1 year has passed since last update.

nRF52832とnRF52840のプロジェクトファイルの差分

Posted at

記事の概要

nRF52832用に作成したプロジェクトをnRF52840に移植する際に、各種設定を変更する必要がありました。
本記事では何を修正したかをメモします。

nRF52の他のシリーズやnRF53などに移植する際も、本記事が参考になると考えています。

ソフトデバイスの違い

nRF52382に対応するソフトデバイスはS132、nRF52340に対応するソフトデバイスはS140になります。

device_nameの差分

nRF52832
arm_target_device_name="nRF52832_xxAA"
nRF52840
arm_target_device_name="nRF52840_xxAA"

c_user_include_directories

nRF52832
../../../../../../components/softdevice/s132/headers;
../../../../../../components/softdevice/s132/headers/nrf52;
nRF52840
../../../../../../components/softdevice/s140/headers;
../../../../../../components/softdevice/s140/headers/nrf52;

c_preprocessor_definitions

nRF52832
BOARD_PCA10040;
NRF52;
NRF52832_XXAA;
NRF52_PAN_74;
S132;
nRF52840
BOARD_PCA10056;
NRF52840_XXAA;
S140;

debug_register_definition_file

nRF52832
debug_register_definition_file="../../../../../../modules/nrfx/mdk/nrf52.svd"
nRF52840
debug_register_definition_file="../../../../../../modules/nrfx/mdk/nrf52840.svd"

debug_additional_load_file

nRF52832
debug_additional_load_file="../../../../../../components/softdevice/s132/hex/s132_nrf52_7.2.0_softdevice.hex"
nRF52840
debug_additional_load_file="../../../../../../components/softdevice/s140/hex/s140_nrf52_7.2.0_softdevice.hex"

linker_section_placement_macros

メモリマップの設定です。
RAM_STARTRAM_SIZEは作成するアプリケーションにより変わるので、適当に設定します。
他の項目については、nRF52840はFLASHとRAMのサイズがnRF52832より大きいので必ず修正しないといけません。

nRF52832
FLASH_PH_SIZE=0x80000;
RAM_PH_SIZE=0x10000;
FLASH_START=0x26000;
FLASH_SIZE=0x5a000;
RAM_START=0x200022f0;
RAM_SIZE=0xdd10"
nRF52840
FLASH_PH_SIZE=0x100000;
RAM_PH_SIZE=0x40000;
FLASH_START=0x27000;
FLASH_SIZE=0xd9000;
RAM_START=0x20002300;
RAM_SIZE=0x3dd00"

linker_section_placements_segments

nRF52832
FLASH RX 0x0 0x80000;
RAM1 RWX 0x20000000 0x10000"
nRF52840
FLASH RX 0x0 0x100000;
RAM1 RWX 0x20000000 0x40000"

file_name

nRF52832
<file file_name="../../../../../../modules/nrfx/mdk/ses_startup_nrf52.s" />
<file file_name="../../../../../../modules/nrfx/mdk/system_nrf52.c" />
nRF52840
<file file_name="../../../../../../modules/nrfx/mdk/ses_startup_nrf52840.s" />
<file file_name="../../../../../../modules/nrfx/mdk/system_nrf52840.c" />
2
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
2
1