Skip to main content
robertabel9
Associate
November 18, 2016
Question

Information on patch.xml workflow

  • November 18, 2016
  • 2 replies
  • 1195 views
Posted on November 18, 2016 at 17:38

I'm currently using SPC5Studio 4.2.1 (4.2.1.201607051420) and use it to develop on an SPC560B-DIS evaluation board. I noticed that edits I make to component files in the lib sub-directory are handily stored in regular diff format in patch.xml.

However, I would also like to edit files in e.g. the cfg sub-directory, so I manually created the following entry inside the patch.xml file:

<?
xml
version
=
''1.0''
encoding
=
''UTF-8''
?>
<
SPC5-Patch
version
=
''1.0.0''
>
<!--It is your patch repository, do not break your XML File.-->
<
files
>
<
file
componentId
=
''org.chibios.spc5.components.spc5hal''
version
=
''1.0.0.201607011046''
path
=
''component/cfg/halconf.h''
user
=
''false''
>
<
diff
>
<![CDATA[--- components/portable_spc5_hal_component/cfg/halconf.h
+++ components/portable_spc5_hal_component/cfg/halconf.h
@@ -79,7 +79,7 @@
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
-#define HAL_USE_I2C FALSE
+#define HAL_USE_I2C TRUE
#endif
/**]]>
</
diff
>
</
file
>
</
files
>
</
SPC5-Patch
>

However, these manually introduced patches aren't being applied once I recreate the component tree. Is there some setting/trick/... to enable this? Is my syntax wrong? Or is it plain not possible to patch files outside of the lib sub-directories at the moment? #spc5studio-patch
    This topic has been closed for replies.

    2 replies

    Erwan YVIN
    ST Employee
    November 21, 2016
    Posted on November 21, 2016 at 09:57

    Hello robert ,

    You can not patch a configuration file (cfg directory).

    cfg file is a file generated from the GUI.

    I2C driver does not exist on B Discovery (HAL & RLA)

    HAL Side : i2c_lld.c should be created

    RLA Side : i2c_lld.c should be created

    we have a change request to create I2C for B Discovery

    (i am writing a private email for you)

    Best regards

    Erwan

    robertabel9
    Associate
    November 22, 2016
    Posted on November 22, 2016 at 14:31

    Hi Erwan,

    It's unfortunate that the cfg files cannot be patched. The reason I'm asking is that I implemented my own i2c lld interrupt-driven driver but use the ChibiOS hal to be compatible. So far I haven't received your private e-mail.

    Regards,

    Robert
    Erwan YVIN
    ST Employee
    January 18, 2017
    Posted on January 18, 2017 at 16:49

    Hello Robert ,

    You should check the post

    https://community.st.com/0D50X00009XkYQQSA3

    Best regards

    Erwan