[
https://issues.apache.org/jira/browse/MYNEWT-360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15434534#comment-15434534
]
Tim commented on MYNEWT-360:
----------------------------
Yep that works! Thanks very much!
I'm using Qt Creator. It's fairly easy to set up with newt. Just do this:
1. Create your newt project as usual.
2. Create a makefile for your project.
3. File->New File or Project...->Import Project->Import Existing Project.
4. Select all the files you want to edit in the import dialog. The default
works fine.
5. Add all the include dirs to myproject.includes with a command like this:
find . -name "include" > myproject.includes
6. Go to the Projects pane, then the Run tab. Set the custom executable as
'make' and the arguments as 'flash'.
7. That's it! Ctrl-B to build, Ctrl-R to build, flash and reset.
Things that work:
* Code completion
* Ctrl-click (jump to definition)
* Refactoring (renaming symbols, etc)
Things that don't work:
* Parsing errors from the compile output into a nice list sometimes doesn't
work. I think the format is different from what it expects.
* Double clicking on errors to jump to their location doesn't work, because the
compile output doesn't give the full path to the source file, only its name.
Apparently this depends on where gcc is invoked from so it could be fixed.
* I haven't tried to get debugging working. I have previously got it working
with mBed via JLink's GDB server in the past in Qt Creator, but it is a huge
pain and quite buggy so I usually resort to printf debugging.
Here's the makefile I use. It's not perfect (hope you never have a file called
.cmd!) but does the job for now.
{code}
all:
newt build logger
flash:
newt build logger
newt create-image logger 1.0.0
newt load logger
echo -e "r\ngo\nexit\n" > .cmd
JLinkExe -device nRF52 -speed 4000 -if SWD -CommandFile .cmd
rm .cmd
flashboot:
newt load nrf52_boot
.PHONY: clean
clean:
newt clean logger
erase:
echo -e "erase\nexit\n" > .cmd
JLinkExe -device nRF52 -speed 4000 -if SWD -CommandFile .cmd
rm .cmd
{code}
> "the input device is not a TTY" when newt isn't run in terminal
> ---------------------------------------------------------------
>
> Key: MYNEWT-360
> URL: https://issues.apache.org/jira/browse/MYNEWT-360
> Project: Mynewt
> Issue Type: Bug
> Components: Newt
> Affects Versions: v0_9_0
> Environment: Ubuntu 14.10 using the Docker version of newt
> Reporter: Tim
> Assignee: Todd Mitton
> Fix For: v1_0_0_beta1
>
>
> Basically, if I run newt (the Docker wrapper script) in an IDE rather than a
> terminal, it prints this:
> newt build bleprph -DLOG_LEVEL=LOG_LEVEL_INFO
> the input device is not a TTY
> I believe this is some craaaazy Docker issue, probably this one:
> https://github.com/docker/docker/issues/8755
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)