Forum Replies Created
-
AuthorPosts
-
ketParticipant
Hi,
Even the newest gcc version has only experimental full c++11 support. Our Raspberry Pi cross-toolchain uses gcc version 4.6.3, as such it has only limited support for some c++0x features as listed at http://gcc.gnu.org/gcc-4.6/cxx0x_status.html .
Add -std=c++0x to CFLAGS to enable support.ketParticipantHi,
The error message “error : ‘for’ loop initial declarations are only allowed in C99 mode” tells that in the current mode loop initial declarations are not allowed. The compiler sets the compilation mode based on the file endings.
ketParticipantHi,
Could you give us a GDB log of one such occurence? If a gdb timeout happens, it will be shown in the log, as will any other gdb and debugging issues.
Please go to VisualGDB Project Properties, on the GDB settings page set the option to write diagnostic GDB logs. Then start debugging and replicate your scenario, send us the gdb log file from your project directory.
ketParticipantHi,
That is a difference between c and c++, and a bug of 4.0. Either rename the file LEDBlink.c to LEDBlink.cpp or move the loop variable declaration before the loop initialization as follows:
int i; for (i = 0; i < 1000000; i++)
ketParticipantHi,
Based on your screenshots, you are still using version 3.x VisualGDB, please install the latest 4.0 beta from the download page at http://visualgdb.com/download/.
ketParticipantHi,
Others have had similar issues: viewtopic.php?f=5&t=2648
It can occur due to linker issues or hard-coded dependent library paths coded into the libraries. Try the ideas from the linked thread.
You could also try to add pthread onto the library list as well even if it is a dependency of a dependency, this sometimes helps.ketParticipantHi,
Even an app using only native activities generates an apk. Our Android projects and debugging the custom APK are meant for the usual app debugging ways of using an APK.
If you are compiling with BUILD_EXECUTABLE specified in the Android makefile, then you need to think of debugging more in terms of generic Linux debugging. As there is no gdbserver to use from the APK, you need to use the gdbserver from the Android device. Also, you should use the gdb from Android NDK directly and deploy the app manually with adb. You should search for which adb commands to execute in order to debug executables build with BUILD_EXECUTABLE.
With VisualGDB it would probably be easiest to make a custom project in the same android project solution and use that custom project just for deploying and debugging. Setting the custom project dependent on the android project and keeping the custom project as the startup project will make the building and debugging work well together. A custom project allows specifying arbitrary sequences of commands for debugging and is easy to setup once you know which commands to execute.
ketParticipantHi,
That looks fine. You could try to use an absolute path for the library, but if the library would not be found the build output would state that.
Are you using ‘extern “C” { }’ around the piface include statements in your code?ketParticipantHi,
Please use user variables defined in VisualGDB Project Properties instead. The VisualGDB user variables feature was added in version 4.0.
You can define your MCU variable there similarly to MSVS variables and use it throughout VisualGDB Project Properties as $(MCU).ketParticipantHi,
What have you specified in the debug.mak for the libraries? The problem occurs because the library is either not specified or not found. Based on your command line it should contain “LIBRARY_NAMES := piface-1.0”. You can also try to specify the library location in sysroot in the LIBRARY_DIRS variable. Also make sure the library actually exists in sysrootusrlocallib.
ketParticipantHi,
The generated makefiles were changed with version 4.0. You will not see the Makefile settings page unless you are using version 4.0 generated makefiles. On the project settings page change the build subsystem to ‘GNU Make’ and generate a new makefile. Then the Makefile settings page will appear. You can of course just make a new project as well.
ketParticipantHi,
Adding header and source files to the project should usually work if you are adding the files into the project directory. If you add existing files from outside the project directory, then you need to include the include directory in the mak file as otherwise make will not find the header. The source file list is updated automatically in the Makefile. IntelliSense is a Visual Studio feature and works separately from the build system.
The sysroot directory is like the root directory on Raspberry. So, everything there should be placed as it is on the Raspberry e.g. the /usr/include directory should be inside sysroot as C:SysGCCraspberryarm-linux-gnueabihfsysrootusrinclude. In the VisualGDB version 4.0 there is even a way to automatically copy these directories over: In the VisualGDB Project Properties on the Makefile settings page there is button ‘Synchronize sysroot’ next to the toolchain selection. It can copy over the selected directories automatically.
ketParticipantHi,
Right-click on the project in Solution Explorer and choose VisualGDB Project Properties. At the build settings section there is a field where you can enter additional ndk-build arguments.
ketParticipantHi,
Please try rebuilding.
It looks like you previously built using cygwin and now the .d files have cygwin paths that confuse make. Rebuilding our Android projects by default deletes the obj folder where the .d files are.
If it does not help, search where the built .d files of your project are and then delete them.ketParticipantHi,
Usually the full custom project is used to execute sequences of commands for building and debugging. With the upcoming version of VisualGDB, there will also be a possibility of extending Linux projects with custom command sequences pre and post build/debug commands.
-
AuthorPosts