Skip to content

Adding support for visionfive2 #65545

Closed Answered by grb72t3yde
kanakshilledar asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, I made some progress today. The ROM_BASE macro need to be defined in the linker script, and it's value comes from your devicetree configuration. As following:

#ifdef CONFIG_XIP
#if DT_NODE_HAS_COMPAT_STATUS(DT_CHOSEN(zephyr_flash), soc_nv_flash, okay)
#ifdef CONFIG_FLASH_LOAD_OFFSET
#define ROM_BASE (DT_REG_ADDR(DT_CHOSEN(zephyr_flash)) + \
				CONFIG_FLASH_LOAD_OFFSET)
#else /* !CONFIG_FLASH_LOAD_OFFSET */
#define ROM_BASE DT_REG_ADDR(DT_CHOSEN(zephyr_flash))
#endif /* CONFIG_FLASH_LOAD_OFFSET */
#define ROM_SIZE DT_REG_SIZE(DT_CHOSEN(zephyr_flash))
#elif DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_flash), jedec_spi_nor)
/* For jedec,spi-nor we expect the spi controller to memory map the fla…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@grb72t3yde
Comment options

@kanakshilledar
Comment options

@grb72t3yde
Comment options

Comment options

You must be logged in to vote
1 reply
@kanakshilledar
Comment options

Answer selected by kanakshilledar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants