Forum Replies Created
-
AuthorPosts
-
supportKeymaster
The GCC compiler does not have a concept of “stack size”. It uses all space between the end of data and _estack as the stack. If you want to reserve a certain amount for the stack, you can define an array of that size, put it to a separate section and modify the linker script to place it after the data. In that case if the overall amount of used memory exceeds the device SRAM size, you will get a linker error.
supportKeymasterHi,
In order to replace the newlib’s implementation of _write() with your own one you would need to recompile newlib itself. If you don’t want to do it, you can hook it dynamically:
static int my_write(struct _reent *, _PTR, const char *buf, int len) { ... } int main() { stdout->_write = my_write;
stdout->_flags |= __SNBF;
printf("Hello...");
}
supportKeymasterHi,
Based on our quick tests, clang produces executables that can be easily debugged with gdb. As lldb is not backward-compatible with gdb/mi and uses its own API, support it would be quite an investment. If you could give a good overview about the advantages it would have over using gdb for debugging llvm-compiled code, we could see if we could support it soon.
supportKeymasterHi,
You can always revert back to VisualGDB 2.x (just replace the version number in the download URL on our website). Additionally you can backup the following directories:
%LOCALAPPDATA%VisualGDB
%APPDATA%VisualGDB
Your android tools directories
Your project directories
Registry ({HKLM, HKCU}SoftwareSysprogsVisualGDB)VisualGDB does not store anything critical anywhere else, so if things go wrong, you can simply recover those directories.
supportKeymasterYes, simply add -Wl,-Map=output.map to LDFLAGS. Actually, can you send both binaries (the ones with and without a reference to libmmal_vc_client) to our support email? We should be able to see the difference from a quick look at the section dump and some disassembly.
supportKeymasterSorry, we don’t have a specific guide for those OSes. As VisualGDB uses GNU Make as the underlying build system, you can follow the FreeRTOS manuals on creating a Makefile and then simply import the project into VisualGDB using the “Import Project” setting in our wizard. If your project can be built with command-line Make, VisualGDB will easily work on top of it.
supportKeymasterHi,
Visual Studio 2010 has very limited support for C++1x, so IntelliSense errors are fully expected in this case. On a long term we are working on resolving this by providing an independent IntelliSense engine. On a short term you may be able to work around it by undefining some of the C++1x defines for IntelliSense:
#ifdef _MSC_VER
#undef …
#endifThe list of C++1x-specific defines can be found by comparing gcc_Debug.h before/after enabling C++1x support.
supportKeymasterHi,
Visual Studio is only involved in IntelliSense; compilation is fully performed by gcc using the standard library that comes with gcc. Please verify that the implementation of shared_ptr that comes with your gcc version has the operator-> defined.
supportKeymasterHi,
There is actually a bug in VisualGDB 4.1 that prevents it from automatically disabling the clang-incompatible options. This will be resolved in the upcoming VisualGDB 4.2. As a workaround please continue creating the project, then edit the debug.mak/release.mak files:
1. Remove “-Wl,-gc-sections” from LDFLAGS
2. Remove values of START_GROUP and END_GROUPsupportKeymasterYes, if you are using Custom or Ultimate editions. Use the “Custom build steps” page in VisualGDB Project Properties.
supportKeymasterHi,
Forcing to link against a library with no actual functions imported would not solve the problem if some component is missing. Please try examining the symbol table of the module that links against the library correctly (readelf -s
), find out which functions are imported from libmmal_vc_client.so and then see why they are not imported on the version built with the cross-compiler (enable creation of a map file to see details about functions). supportKeymasterHi,
In order to automatically get stopped in main(), start debugging by pressing F10 (step into new instance), not F5 (start new instance).
supportKeymasterHi,
We are putting –start-group/–end-group around all files because the -lXXX form can refer to either libXXX.a or libXXX.so depending on what is available in the library directories. We also tested it with shared libraries and did not encounter any problems.
Could you please share a log showing the command line and the build error you encountered? If we could reproduce it on our side, we should be able to provide a solution that works for both cases.supportKeymasterHi,
Thanks for the details. The message box was originally used to provide information about the exact signal gdb reports, however it does indeed look redundant when the only information it contains is the SIGINT name. We will add an option to filter it out in the next release.
Regarding your gdb log, it looks like you are not setting any breakpoints. The only -break-insert command sets a breakpoint in main() and this breakpoint is successfully hit later. Could you please share a screenshot of your breakpoints? Are you setting them before running your firmware or when it’s already running?
supportKeymasterHi,
The error with ‘dat.getContentType()’ is by design, as it literally means ‘invoke the getContentType() method of the dat object’ and as the pointer itself does not have a getContentType() method, it produces an error.
The error with the -> form means that the smart pointer you are using does not define an overloaded “operator->”. Please check the source code of the standard library you are using whether the operator is defined. You can read more about overloading the -> operator here: http://www.tutorialspoint.com/cplusplus/class_member_access_operator_overloading.htm -
AuthorPosts