Skip to content

__stm32_sdram2_section is no longer defined in Zephyr with their current sources. #202

@KurtE

Description

@KurtE

Describe the bug
Zephyr removed these defines from secttion_tags.h.
I found this out when I rebased my Pull request to the current sources:
zephyrproject-rtos/zephyr#93797

I received a reply to see:
zephyrproject-rtos/zephyr#95299

which was pulled in 2 days ago.

So the loader/fixups.c code:

#if defined(CONFIG_SHARED_MULTI_HEAP)
#include <zephyr/kernel.h>
#include <zephyr/devicetree.h>
#include <zephyr/multi_heap/shared_multi_heap.h>

__stm32_sdram1_section static uint8_t __aligned(32) smh_pool[4 * 1024 * 1024];

int smh_init(void) {
	int ret = 0;
	ret = shared_multi_heap_pool_init();
	if (ret != 0) {
		return ret;
	}

	struct shared_multi_heap_region smh_sdram = {
		.addr = (uintptr_t)smh_pool,
		.size = sizeof(smh_pool),
		.attr = SMH_REG_ATTR_EXTERNAL,
	};

	ret = shared_multi_heap_add(&smh_sdram, NULL);
	if (ret != 0) {
		return ret;
	}
	return 0;
}

SYS_INIT(smh_init, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
#endif

no longer builds.

Target board + cli verbose compilation output
This will impact both: Arduino GIGA as well as Arduino Portenta H7

Full verbose compilation output, ideally with arduino-cli invocation or from IDE 2.3.3+
My zephyr test sketches builds fail with:

D:/zephyrproject/zephyr_test_sketches/camera_to_tft/src/main.cpp:790:1: error: '__stm32_sdram1_section' does not name a type
  790 | __stm32_sdram1_section static uint8_t __aligned(32) smh_pool[4*1024*1024];
      | ^~~~~~~~~~~~~~~~~~~~~~
D:/zephyrproject/zephyr_test_sketches/camera_to_tft/src/main.cpp: In function 'int smh_init()':
D:/zephyrproject/zephyr_test_sketches/camera_to_tft/src/main.cpp:801:29: error: 'smh_pool' was not declared in this scope
  801 |         .addr = (uintptr_t) smh_pool,
      |                             ^~~~~~~~
[68/273] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/shell/modules/kernel_service/thread/resume.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' --build 'D:\zephyrproject\zephyr_test_sketches\camera_to_tft\build'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions