{"push_id":891572865,"size":119,"distinct_size":119,"ref":"refs/heads/master","head":"648b6926b5ebd9b1d56ced989aaf7fef8ede8222","before":"513d8bc9d546110d14844b96ca0764d1aeef6007","commits":[{"sha":"afe5d0403dd791d1e66d49a5323eb24c51f383e7","author":{"email":"b3efeb72fa9d3102885911404c5fbece843f6c8f@gmail.com","name":"Benoît Thébaudeau"},"message":"cc2538: Build without the Contiki target library\n\nThe GNU linker ld searches and processes libraries and object files in\nthe order they are specified. Library files are archive files whose\nmembers are object files. The linker handles an archive file by scanning\nthrough it for members that define symbols that have so far been\nreferenced but not defined. But an ordinary object file is linked in the\nusual fashion.\n\nThe C library is implicitly linked after all object files and libraries\nspecified on the command line.\n\nBecause of that, if the C library depends on the Contiki target library,\ne.g. for the implementation of system calls, then these dependencies are\nnot linked, which results in undefined references. Actually, the Contiki\ntarget library also needs the C library, hence a circular dependency\nbetween these libraries, which means that explicitly adding -lc anywhere\non the command line can not help. The only solution in that case is to\npass these libraries to ld between --start-group and --end-group.\nArchives grouped in this way are searched repeatedly by the linker until\nno new undefined references are created.\n\nThis archive grouping option has a significant performance cost for the\nlinking stage. Moreover, having to use it and to pass -lc explicitly on\nthe command line is unusual, which is disturbing and more complicated\nfor users needing the C library to depend on the Contiki target library.\nThe same would be true for circular dependencies between the Contiki\ntarget library and any other library.\n\nAnother issue with the Contiki target library is that it may alter the\napparent behavior of the weak vs. strong symbols, because of the way ld\nhandles archives, which may make it discard archive object files\ncontaining strong versions of referenced symbols:\n - If a symbol has a weak and a strong version in this library, both\n   inside the same object file, then the linker uses the strong\n   definition.\n - If a weak symbol in this library has a strong counterpart in an\n   object file outside, then the linker uses the strong definition.\n - If a strong symbol in this library is inside an object file\n   containing other referenced symbols, and has a weak counterpart\n   anywhere, then the linker uses the strong definition.\n - If a strong symbol in this library is the only symbol referenced in\n   its object file, and has a weak counterpart in an object file\n   outside, then the linker uses the strong definition if this library\n   is linked first, and the weak one otherwise.\n - If a strong symbol in this library is the only symbol referenced in\n   its object file, and has a weak counterpart in another object file in\n   this library, then the linker uses the definition from the first of\n   these objects added when creating this archive.\n - If a symbol has a weak and a strong version, one in this library, and\n   the other in another library, then the rules are the same as if both\n   were in the Contiki target library.\n\nThe existence of cases where the linker uses a weak symbol despite the\npresence of its strong counterpart in the sources compiled then passed\nto the linker is very error-prone, all the more this behavior depends on\nthe order the object and archive files are passed on the command lines,\nwhich may just result from the order of source files in lists where it\napparently does not matter. Such cases would be needed in the future,\ne.g. to define weak default implementations of some system calls that\ncan be overridden by platform-specific implementations, both ending up\nin the Contiki target library. There was already such a case used to\ndefine the UART and USB ISRs as weak aliases of default_handler(),\nrelying on this implicit unusual behavior to keep default_handler() if\nthe UART or USB driver was unused, which was dangerous.\n\nSince the Contiki target library was only used as an intermediate file\nduring the build, the current commit fixes these issues by simply\ndirectly using the object files instead of building an intermediate\narchive from them.\n\nThe CONTIKI_OBJECTFILES make variable would be incomplete if it were\nused as a simple prerequisite in the %.elf rule in Makefile.cc2538,\nbecause other object files are added to it after this rule. That's why\n.SECONDEXPANSION is used to defer its expansion. Another solution would\nhave been to split Makefile.cc2538, with the variable assignments kept\nin it, and the rule definitions moved to Makefile.customrules-cc2538,\nbut this would have required to add Makefile.customrules-<target> files\nto all CC2538 platforms, only to include Makefile.customrules-cc2538.\nThe solution used here is much simpler.\n\nBecause the UART and USB ISRs were weak aliases of default_handler(),\nthis change would imply that these ISRs would always be used by the\nlinker instead of default_handler(), even if their drivers were\nconfigured as unused with UART_CONF_ENABLE and USB_SERIAL_CONF_ENABLE,\nwhich would be wrong. This commit fixes this issue by removing these\nweak aliases and putting either these ISRs or default_handler() in the\nvector table, depending on the configuration. Weak aliases are elegant,\nbut Contiki's build system does not currently allow to automatically\nbuild or not source files depending on the configuration, so keeping\nthese weak aliases would have required to add #if constructs somewhere\nin the source code, which would have broken their elegance and made them\npointless.\n\nSigned-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/afe5d0403dd791d1e66d49a5323eb24c51f383e7"},{"sha":"d87f6f67e21df977886115436ff33bee617e4500","author":{"email":"d892136343323129b2c7deaa4a02f5a667a811a0@st.com","name":"Marco Grella"},"message":"Added new stm32nucleo-spirit1 platform","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/d87f6f67e21df977886115436ff33bee617e4500"},{"sha":"86f35536a4f770dea3df8d7242d9f289c853488c","author":{"email":"d892136343323129b2c7deaa4a02f5a667a811a0@st.com","name":"Marco Grella"},"message":"Added new stm32nucleo-spirit1 platform","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/86f35536a4f770dea3df8d7242d9f289c853488c"},{"sha":"1116bcca2acc67f91fba9ee65ae730d881dd6169","author":{"email":"d892136343323129b2c7deaa4a02f5a667a811a0@st.com","name":"Marco Grella"},"message":"Updated README.md","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/1116bcca2acc67f91fba9ee65ae730d881dd6169"},{"sha":"ceff03ab2f7e439dffa7e2a5e1fcb4cb6b9a2138","author":{"email":"d892136343323129b2c7deaa4a02f5a667a811a0@st.com","name":"Marco Grella"},"message":"Updated README.md","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/ceff03ab2f7e439dffa7e2a5e1fcb4cb6b9a2138"},{"sha":"b271a4a3c32746d40d8043de1121d94df0964af7","author":{"email":"d892136343323129b2c7deaa4a02f5a667a811a0@st.com","name":"Marco Grella"},"message":"Updated README.md","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/b271a4a3c32746d40d8043de1121d94df0964af7"},{"sha":"211d410d86c9b1bdd2c1cacbc087ea7985a296b4","author":{"email":"d892136343323129b2c7deaa4a02f5a667a811a0@st.com","name":"Marco Grella"},"message":"USE_SUBGHZ_BOARD fix in Makefile.compile-test","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/211d410d86c9b1bdd2c1cacbc087ea7985a296b4"},{"sha":"b61152bfa1dc40417b3bea4e5876b3b79601c850","author":{"email":"d892136343323129b2c7deaa4a02f5a667a811a0@st.com","name":"Marco Grella"},"message":"I/O libraries","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/b61152bfa1dc40417b3bea4e5876b3b79601c850"},{"sha":"bb08369b0187321e0d858f2a5b4426d054d70f9e","author":{"email":"d892136343323129b2c7deaa4a02f5a667a811a0@st.com","name":"Marco Grella"},"message":"Regression tests fixes and Readme update.","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/bb08369b0187321e0d858f2a5b4426d054d70f9e"},{"sha":"711dd02a9c85a4be28b2dc82422b8d474f1e16c8","author":{"email":"d892136343323129b2c7deaa4a02f5a667a811a0@st.com","name":"Marco Grella"},"message":"Improve UART IRQ management.","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/711dd02a9c85a4be28b2dc82422b8d474f1e16c8"},{"sha":"62c33260bd109b771426d517713ed360baffd5ab","author":{"email":"d892136343323129b2c7deaa4a02f5a667a811a0@st.com","name":"Marco Grella"},"message":"Modified structure to use a sub-module for platform APIs","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/62c33260bd109b771426d517713ed360baffd5ab"},{"sha":"49b24e6f53b026edaf484e68664d0d3448e22ae5","author":{"email":"bce3e9c4ef56ae45c1fa3053b884b1d11dacf6dc@st.com","name":"Fabien Castanier"},"message":"Modified the parameter name of clock_wait function","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/49b24e6f53b026edaf484e68664d0d3448e22ae5"},{"sha":"765ce0c22f4d3fda225445147886e1dc32da4819","author":{"email":"dd6f129d56ef388c632a8e9bfecfc157a04382e3@gmail.com","name":"Atis Elsts"},"message":"Fix Rime attribute serialization in chameleon-bitopts.c for big endian systems","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/765ce0c22f4d3fda225445147886e1dc32da4819"},{"sha":"913ef068bed7714f0f8ab19bc32dc63de85035ca","author":{"email":"d892136343323129b2c7deaa4a02f5a667a811a0@st.com","name":"Marco Grella"},"message":"Updated submodule stm32cube-lib","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/913ef068bed7714f0f8ab19bc32dc63de85035ca"},{"sha":"7b27ad64ca7bdae3e131a2b6211381348c0f863f","author":{"email":"7228a3aa8e90f0c1890c41c20e41f95237961901@scanimetrics.com","name":"Billy Kozak"},"message":"Replaced function pointer cast in contikimac\n\nReplaced a cast of the funciton pointer to powercycle with a\nwrapper calling powercycle which has the correct signature.\n\nThe previous implementation was an instance of undefined behaviour\naccording to the C standard.","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/7b27ad64ca7bdae3e131a2b6211381348c0f863f"},{"sha":"a627a542240429434cf110dd874f38c8cbd5be29","author":{"email":"d892136343323129b2c7deaa4a02f5a667a811a0@st.com","name":"Marco Grella"},"message":"Fixes to README.md instructions","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/a627a542240429434cf110dd874f38c8cbd5be29"},{"sha":"17aafb9daa619e2109b73d7ec5b778ebef8fd63e","author":{"email":"d892136343323129b2c7deaa4a02f5a667a811a0@st.com","name":"Marco Grella"},"message":"Align to current master","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/17aafb9daa619e2109b73d7ec5b778ebef8fd63e"},{"sha":"b7459a12c1b667707b0bd3988148122dfe3e30cb","author":{"email":"d892136343323129b2c7deaa4a02f5a667a811a0@st.com","name":"Marco Grella"},"message":"Added radio sensor.","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/b7459a12c1b667707b0bd3988148122dfe3e30cb"},{"sha":"87970a88a4b103eb19b635291994e17dcecbe734","author":{"email":"d892136343323129b2c7deaa4a02f5a667a811a0@st.com","name":"Marco Grella"},"message":"Comments and documentation fixes.","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/87970a88a4b103eb19b635291994e17dcecbe734"},{"sha":"875bfd0a1a77431987c06a4f01db5f55ac2caa59","author":{"email":"d892136343323129b2c7deaa4a02f5a667a811a0@st.com","name":"Marco Grella"},"message":"Updates of REAME files (main and submodule).","distinct":true,"url":"https://api.github.com/repos/bthebaudeau/contiki/commits/875bfd0a1a77431987c06a4f01db5f55ac2caa59"}]}