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

Add zbar Barcode Decoder Library #500

Merged
merged 4 commits into from
Mar 29, 2023
Merged

Add zbar Barcode Decoder Library #500

merged 4 commits into from
Mar 29, 2023

Conversation

ozersa
Copy link
Contributor

@ozersa ozersa commented Mar 21, 2023

Migrate barcode decoder library to the GitHub space to provide flexibility to the developer and customers.
No any change applied during migration.

ozersa added 2 commits March 21, 2023 13:55
Development history here: ssh://gerrit.maxim-ic.com:29418/MnS/CSS/Micros/max32570_barscan

Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>
Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>
@ozersa ozersa requested review from Jake-Carter and ttmut March 21, 2023 12:36
Copy link
Contributor

@ttmut ttmut left a comment

Choose a reason for hiding this comment

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

Thanks for the effort. I have just made a few remarks you may wish to consider before concluding.

Copy link
Contributor

@Jake-Carter Jake-Carter left a comment

Choose a reason for hiding this comment

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

One minor change needed for the Makefile - see below.

FYI added a libinfo.json file whitelisting the MAX32570 only (149b39d). Is it supported by any other micros?

# Export other variables needed by the peripheral driver makefile
export TARGET
export COMPILER
export TARGET_MAKEFILE
Copy link
Contributor

Choose a reason for hiding this comment

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

What does TARGET_MAKEFILE do? I don't see it defined anywhere. Can it be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, done.

export TARGET
export COMPILER
export TARGET_MAKEFILE
export PROJ_CFLAGS
Copy link
Contributor

Choose a reason for hiding this comment

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

This is dangerous and could lead to the corruption of other libraries. Exporting these variables will pass them into all other library builds. Instead of

export TARGET
export COMPILER
export TARGET_MAKEFILE
export PROJ_CFLAGS
export PROJ_LDFLAGS
export MXC_OPTIMIZE_CFLAGS
export BARCODE_DECODER_DIR

I suggest explicitly passing them into the recursive rule for the library file.

Ex:

${BARCODE_BUILD_DIR}/libbarcode_decoder.a: FORCE
	$(MAKE) -C ${BARCODE_DECODER_DIR} lib BUILD_DIR=${BARCODE_BUILD_DIR} TARGET=${TARGET} COMPILER=${COMPILER} PROJ_CFLAGS=${PROJ_CFLAGS} PROJ_LDFLAGS=${PROJ_LDFLAGS} MXC_OPTIMIZE_CFLAGS=${MXC_OPTIMIZE_CFLAGS} BARCODE_DECODER_DIR=${BARCODE_DECODER_DIR}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@Jake-Carter Jake-Carter added the build system This issue or pull request is related to the MSDK build system label Mar 27, 2023
@ozersa
Copy link
Contributor Author

ozersa commented Mar 28, 2023

One minor change needed for the Makefile - see below.

FYI added a libinfo.json file whitelisting the MAX32570 only (149b39d). Is it supported by any other micros?

Only MAX32570 for now.

Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>
@ozersa
Copy link
Contributor Author

ozersa commented Mar 29, 2023

Ready to be merged.

@Jake-Carter Jake-Carter changed the title Dev add zbar lib Add zbar Barcode Decoder Library Mar 29, 2023
@Jake-Carter Jake-Carter merged commit e2f806b into main Mar 29, 2023
@Jake-Carter Jake-Carter deleted the dev-add_zbar_lib branch March 29, 2023 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system This issue or pull request is related to the MSDK build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants