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

ports/psoc6: Completing make_pins changes. #91

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

NikhitaR-IFX
Copy link
Member

By creating this pull request you agree to the terms in CONTRIBUTING.md.
https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md
--- DO NOT DELETE ANYTHING ABOVE THIS LINE ---

CONTRIBUTING.md also tells you what to expect in the PR process.

Description
With this PR, automatic pin generation works fine. I have the following changes there:

  • Python scripts that handle the automatic generation of csv and headers in build (make-pins-csv and make-pins)
  • Makefile changes to integrate the sources with the rest
  • The changes in machine_adcblock has to be so for now until we extend machine_pin structure to incorporate alternate functions

Signed-off-by: NikhitaR-IFX <Nikhita.Rajasekhar@infineon.com>
Copy link
Member

@jaenrig-ifx jaenrig-ifx left a comment

Choose a reason for hiding this comment

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

Good job! :)
As discussed, if the csv is not necessary, removing all those file creation, generation etc, would make our port easier and simpler to maintain.

MAKE_PINS_CSV = ./boards/make-pins-csv.py
MAKE_PINS = ./boards/make-pins.py

ifeq ($(BOARD), CY8CPROTO-062-4343W)
Copy link
Member

Choose a reason for hiding this comment

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

These can go in the corresponding mpconfigport.mk or?

Copy link
Member Author

Choose a reason for hiding this comment

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

Or rather more suitable in mpconfigboard.mk? Because each board will have one such variable set no?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, sorry. I meant mpconfigboard.mk sorry :)

Copy link
Member Author

@NikhitaR-IFX NikhitaR-IFX Sep 26, 2023

Choose a reason for hiding this comment

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

Agreed and updated

MPY_CROSS_FLAGS += -march=armv7m

build: mtb_get_build_flags $(MPY_PATH_TO_MAIN_MAKEFILE) $(MPY_MAIN_BUILD_DIR)/firmware.hex
build: mtb_get_build_flags make_pins_csv $(MPY_PATH_TO_MAIN_MAKEFILE) $(MPY_MAIN_BUILD_DIR)/firmware.hex clean_csv
Copy link
Member

Choose a reason for hiding this comment

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

why clean_csv after build?

Copy link
Member Author

Choose a reason for hiding this comment

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

We don't need to retain the csv files as part of our sources. These are only intermediate files used by make-pins.py to generate the sources in build. But as soon as that is done, we don't need to save or maintain these csv files. I tried to clear them out right after make_pins target is invoked but that does not work because it complains to me as shown in image.
image
And I understand that why. qstr generation is eventually dependent on pins.csv and even before pins_qstr.h is generated csv files are removed. But I don't know how to fix that order anymore :|

Copy link
Member

Choose a reason for hiding this comment

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

We will refine a bit the makefile later. It is fine for now 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes we need to.

Copy link

@IFX-Anusha IFX-Anusha left a comment

Choose a reason for hiding this comment

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

Good!!

Signed-off-by: NikhitaR-IFX <Nikhita.Rajasekhar@infineon.com>
@NikhitaR-IFX NikhitaR-IFX merged commit f829e79 into make_pins_feature Sep 26, 2023
21 checks passed
@NikhitaR-IFX NikhitaR-IFX deleted the make-pins_integration-v1 branch September 26, 2023 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants