Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My first set of changes to add support for MPS3 AN547 TSV targ… #75131

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

mmankal
Copy link

@mmankal mmankal commented Jun 27, 2024

…et the command to build is

west build -p always -b mps3_an547_tsv samples/hello_world

when this target is made the image will be generated as zephyr.bin as well as we have turned on generation of zephyr.lst file to ensure we have debug symbols and disassemble code available

The files changes are
Kconfig.zephyr
boards/arm/mps3/board.yml
boards/arm/mps3/mps3_an547_tsv.dts
boards/arm/mps3/mps3_an547_tsv.yaml
boards/arm/mps3/mps3_an547_tsv_defconfig
boards/deprecated.cmake

…et the command to build is

west build -p always -b mps3_an547_tsv samples/hello_world

when this target is made the image will be generated as zephyr.bin as well as we have turned on
generation of zephyr.lst file to ensure we have debug symbols and disassemble code available

The files changes are
Kconfig.zephyr
boards/arm/mps3/board.yml
boards/arm/mps3/mps3_an547_tsv.dts
boards/arm/mps3/mps3_an547_tsv.yaml
boards/arm/mps3/mps3_an547_tsv_defconfig
boards/deprecated.cmake
Copy link

Hello @mmankal, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

@ithinuel
Copy link
Collaborator

Hello, what does TSV stand for?

Altera UART JTAG driver in boards/arm/mps3/mps_an547_tsv.dts
@atrivedi-tsavoritesi atrivedi-tsavoritesi deleted the branch zephyrproject-rtos:main June 28, 2024 03:58
This istest ready code but not verified yet.
… for jtag-uart.

This will get the jtag-uart going, there is more work to be done on other IO
addresses and we will make these changes are we bring up other IOs and test them.
… ITCM at 0x4000

The Zephyr RAM starts at 0x6000_8000
…tag-uart.

This is ensuring the jtag-uart is being used for FPGA.
Copy link
Collaborator

@tejlmand tejlmand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash following commits into first commit:
9b1c0e9
a2b53c8
c2f0566
fb34094

and remove the merge commit: 7fabda4

@@ -648,12 +648,13 @@ config OUTPUT_SYMBOLS

config OUTPUT_DISASSEMBLY
bool "Create a disassembly file"
default y
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will affect all boards in Zephyr, please do this only for the board (or SoC) where the default should be changed, or provide a better reason why this change should be accepted.

help
Create an .lst file with the assembly listing of the firmware.

config OUTPUT_DISASSEMBLE_ALL
bool "Disassemble all sections with source. Fill zeros."
default n
default y
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will affect all boards in Zephyr, please do this only for the board (or SoC) where the default should be changed, or provide a better reason why this change should be accepted.

Comment on lines +437 to +439
set(mps3_an547_tsv_DEPRECATED
mps3/an547/tsv
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is only needed for boards that are converted from HWMv1 to v2.

mps3_an547_tsv doesn't exist as a hwmv1 board.

Suggested change
set(mps3_an547_tsv_DEPRECATED
mps3/an547/tsv
)

@@ -5,3 +5,4 @@ board:
- name: 'an547'
variants:
- name: 'ns'
- name: 'tsv'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is a tsv board variant ?
Please describe it, what / when is it useful to build for this board.

Remember to update board documentation: https://github.com/zephyrproject-rtos/zephyr/blob/ca38d4bdc0e25cdcf176098454de052dff7b9dbc/boards/arm/mps3/doc/index.rst

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I asked this question a week ago..

Based on the commiter’s email address, my guess would be that this is a shortened version of Tsavorite for Tsavorite Scalable Intelligence.

As far as I can see, this new board only differs from the base board on some of the console output and the memory layout/partitions used.
It seems to me this should be a downstream overlay instead of an extra board variant upstream.

The UART addresses are correct for DV and FPGA environment and commented out
unused peripherals and created TSV specific common DTSI.
Making changes to divide the SRAM in code and stack/heap into separate
space on SRAM. This change finishes full execution of sample code in
DV environment.
@zephyrbot zephyrbot added the area: Samples Samples label Jul 8, 2024
@zephyrbot zephyrbot requested a review from kartben July 8, 2024 02:16
secure image, but the non secure image is broken in both fork as main
in QEMU environment, so used mps3_an547 as a base for mps3_an547_tsv.
Have mapped Flash as first section of 16K of SRAM, and the RAM for kernel
is bottom 767K of SRAM, have mapped the other 1MB of SRAM0 and 2 MB
of SRAM1 to SRAM and ISRAM respectively.
| FLASH (16K) in SRAM0    |
| 240K  (Spare) in SRAM0  |
| Kernel (767 K) in SRAM0 |
| 1K (Spare)              |
| 1MB SRAM0 as SRAM       |
| 1MB SRAM1 as ISRAM      |
| 1MB SRAM1 as DDR        |

This is temporary arrangement to make progress. We will revist once we
have jtag-uart and other FPGA functionality working.
address layout as follows

| FLASH (32K) in SRAM0    |
| Kernel (2016 K) in SRAM0 |
| 1MB SRAM1 as ISRAM      |
| 1MB SRAM1 as DDR        |

Also fixed the addresses of ITCM and DTCM as 0x4000 and 0x20000000
which is what it is on the device and reflected the same in yaml.
as the user space applications are bigger, the hello_world_user is
around 42K of code size. To accomodate this and future use cases made
code area as 256K and adjusted Kernel Stack/Heap area to be 1792K as
follows

| FLASH (256K) in SRAM0    |
| Kernel (1792 K) in SRAM0 |
| 1MB SRAM1 as ISRAM      |
| 1MB SRAM1 as DDR        |

This change is tested with hello_world_user applications which starts
a hello_world thread which is around 42K of code size.
as well as added changes to create zephyrstrp.hex without the first
line so that it can be loaded as is on the sram.
the shell works as follows
uart:~$ help
Please press the <Tab> button to see all available commands.
You can also use the <Tab> button to prompt or auto-complete all commands or its subcommands.
You can try to call commands with <-h> or <--help> parameter for more information.

Shell supports following meta-keys:
  Ctrl + (a key from: abcdefklnpuw)
  Alt  + (a key from: bf)
Please refer to shell documentation for more details.

Available commands:
  clear    : Clear screen.
  device   : Device commands
  devmem   : Read/write physical memory
            Usage:
            Read memory at address with optional width:
            devmem address [width]
            Write memory at address with mandatory width and value:
            devmem address <width> <value>
  help     : Prints the help message.
  history  : Command history.
  kernel   : Kernel commands
  rem      : Ignore lines beginning with 'rem '
  resize   : Console gets terminal screen size or assumes default in case the
            readout fails. It must be executed after each terminal width change
            to ensure correct text display.
  retval   : Print return value of most recent command
  shell    : Useful, not Unix-like shell commands.

The command to use for beuild is as follows
"west build -p always -b mps3_an547_tsv samples/subsys/shell/devmem_load/ \
 -- -DOVERLAY_CONFIG=prj_poll.conf"
@@ -2020,6 +2020,41 @@ add_custom_command(
COMMAND_EXPAND_LISTS
)

if(CONFIG_BUILD_OUTPUT_TSV_STRIPPED_HEX)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.

@ithinuel ithinuel marked this pull request as draft July 15, 2024 09:23
@ithinuel
Copy link
Collaborator

Converting to Draft as:

  • the author didn’t respond to previous reviews
  • the author seems to continue pushing new changes
  • the PR doesn’t pass CI

atrivedi-tsavoritesi and others added 8 commits July 15, 2024 12:06
to be used by all developers for FPGA and DV testing
the build now generate IMAGE0_testfile.hex
… - skyp & CPUcore : m85 and modified file names accordingly
I have added new board and SOC configurations to the Zephyr tree
structure in the tsi_m85 branch. Instead of using **mps3_an547_tsv**, we
can now use **ek_tsi_skyp**.
* TSI: board name changed

-ek_tsi to tsi board name changed
-comilance erros removed from some files

Signed-off-by: Ganesh Kethamalla <gkethamallax@tsavoritesi.com>

* TSI Board: compliance errors removed and and board variant name changed

-board variant name changed to m85 to cortex-m85
-white spaces and extra lines removed

Signed-off-by: Ganesh Kethamalla <gkethamallax@tsavoritesi.com>

* TSI Board: old board file removed from directory

-created tsi new directory, instead of using ek_tsi. that's removed old one.

Signed-off-by: Ganesh Kethamalla <gkethamallax@tsavoritesi.com>

* added new cpu configuration adsp

* Modified TXE address for DV environment testing

* @FIR-13: Create a new target "west build -p always -b tsi/skyp/txe samples/hello_world/"
and remove the old target "west build -p always -b tsi/mimx8ml8/adsp samples/hello_world/"
there are still references to using mimx8m tool chain and drivers but we will revisit
these later, I tried to make the change but gave up as it requires defining all of SOC
structure will rely on Ganesh to address these items.

* @FIR-13: Fix the lint and compliance warnings

* @FIR-13: Fixed compliance warning

* @FIR-13: Added tsi - Tsavorite Scalable Intelligence as a vendor

* @FIR-13: Fixed the sorting issue of vendors list

* removed unused symbol BOARD_TSI_MIMX8ML8_ADSP

* Synced for new target tsi/skyp/m85 that removed the ek_ prefix

* Removed white-spaces in main.c and Readme.rst

* renamed folder boards/tsi/tsi to boards/tsi/skyp

* Removed compilance check warnings

---------

Signed-off-by: Ganesh Kethamalla <gkethamallax@tsavoritesi.com>
Co-authored-by: Dinesh Reddy <dreddy@ws03.tsavoritesi.net>
Co-authored-by: Ashish Trivedi <atrivedi@tsavoritesi.com>
Co-authored-by: Meera Mankali <mmankali@wssim0.tsavoritesi.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants