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 arm-linux build for RPi2 and fix for nuttx build #125

Merged
merged 1 commit into from
Jul 20, 2015
Merged

Add arm-linux build for RPi2 and fix for nuttx build #125

merged 1 commit into from
Jul 20, 2015

Conversation

seanshpark
Copy link
Contributor

IoT.js-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com

also fix for nuttx build, as jerry has removed nuttx and fixed to use external.

CMAKE_FORCE_C_COMPILER(${EXTERNAL_CMAKE_C_COMPILER} GNU)
CMAKE_FORCE_CXX_COMPILER(${EXTERNAL_CMAKE_CXX_COMPILER} GNU)

set(DEVICE_DEPENDS "linux-arm-rpi2")
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this file for "arm-linux" ?
Specifying "rpi2" in this file seems not appropriate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

some where we need to specify rpi2 cause of gpio

Copy link
Contributor

Choose a reason for hiding this comment

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

That true but I don't think this file is correct place.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, do you have a place in mind? I can change.

@ILyoan
Copy link
Contributor

ILyoan commented Jul 15, 2015

I think we need to discuss GPIO API in #110.
After reach a consensus, development of GPIO will be much straightforward.

@ILyoan
Copy link
Contributor

ILyoan commented Jul 15, 2015

We have gpio api for example, 'gpio.write(pin, data, callback).
GPIO backend for stm32 write given data. but backend for RPI2 write '0' if the given data is 0 or write '1'. I think this behavior does not guarantee for user consistency among various hardware.

@seanshpark
Copy link
Contributor Author

GPIO backend for stm32 write given data

yes, for STM32, explicit set data to 0 or 1 seems better to match digital I/O. the code is as is for analog value (0~255) also, that may not be same as RPi2.
right now I'm not sure about the values and my thought is to change while use case development.

This was referenced Jul 15, 2015
@seanshpark seanshpark changed the title Add arm-linux build and gpio for RPi2 Add arm-linux build for RPi2 and fix for nuttx build Jul 19, 2015
@seanshpark
Copy link
Contributor Author

Changed this PR to reflect #122(jerryscript-project/jerryscript#330) and jerryscript-project/jerryscript#345.
GPIO related implemetation(#110) will be in next PR

if(${CFG_SYS_PROCESSOR} STREQUAL "x86" OR
${CFG_SYS_PROCESSOR} STREQUAL "x86_64")
set(DEVICE_DEPENDS "linux-x86")
elseif(${CFG_SYS_PROCESSOR} STREQUAL "armv7l-hf")
Copy link
Contributor

Choose a reason for hiding this comment

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

"armv7l-hf" just tells us the cpu architecture, we could not determine that this is Raspberry PI2 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, we need board dependent implementation. at this time there is only one arm-linux and it's RPi2, but later there might be others. I'm not sure about how to extend this right now. I hope you can give a way to do this.

@seanshpark
Copy link
Contributor Author

board specific names are removed. when implementation differs we can add compile directives.

IoT.js-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
@ILyoan
Copy link
Contributor

ILyoan commented Jul 20, 2015

@seanshpark OK thanks. I see numbers likely are different from board to board even if we use the same implementation for different boards so we need board directive as you mentioned. I'll modify build script for adding board directive.

@ILyoan
Copy link
Contributor

ILyoan commented Jul 20, 2015

@seanshpark I think last commit is enough to be merged. as we can adjust trivial issues from following updates. Let's make it merged.
Thanks

@seanshpark seanshpark merged commit d41b086 into jerryscript-project:master Jul 20, 2015
@seanshpark seanshpark deleted the armlinux branch July 20, 2015 01:55
pmarcinkiew referenced this pull request in pmarcinkiew/iotjs Aug 29, 2017
Added functions to read RSSI and IP address into LWM2M connectivity o…
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.

None yet

2 participants