)]}'
{"src/flash/nor/stm32l4x.h":[{"author":{"_account_id":1000005,"name":"Andreas Fritiofson","email":"andreas.fritiofson@gmail.com","username":"Nattgris"},"change_message_id":"f799391771c79f8c50fed23bff13c7076d386bf4","unresolved":false,"context_lines":[{"line_number":20,"context_line":"#define OPENOCD_FLASH_NOR_STM32L4X"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"/* FLASH_CR register bits */"},{"line_number":23,"context_line":"#define FLASH_PG\t\t\t\t(1ULL \u003c\u003c 0)"},{"line_number":24,"context_line":"#define FLASH_PER\t\t\t\t(1UL \u003c\u003c 1)"},{"line_number":25,"context_line":"#define FLASH_MER1\t\t\t\t(1UL \u003c\u003c 2)"},{"line_number":26,"context_line":"#define FLASH_PAGE_SHIFT\t\t3"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"2ecb373e_cb1b3520","line":23,"range":{"start_line":23,"start_character":24,"end_line":23,"end_character":25},"updated":"2021-08-11 17:12:31.000000000","message":"Any reason for the extra L on this one or is it a typo?","commit_id":"43e6920714de4f7aa6893fe555c540071a529170"},{"author":{"_account_id":1000863,"name":"Tarek BOCHKATI","email":"tarek.bouchkati@gmail.com","username":"BouchkatiTarek"},"change_message_id":"f453d3e876c074b7b7b00d12ca97028d5847ae7d","unresolved":false,"context_lines":[{"line_number":20,"context_line":"#define OPENOCD_FLASH_NOR_STM32L4X"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"/* FLASH_CR register bits */"},{"line_number":23,"context_line":"#define FLASH_PG\t\t\t\t(1ULL \u003c\u003c 0)"},{"line_number":24,"context_line":"#define FLASH_PER\t\t\t\t(1UL \u003c\u003c 1)"},{"line_number":25,"context_line":"#define FLASH_MER1\t\t\t\t(1UL \u003c\u003c 2)"},{"line_number":26,"context_line":"#define FLASH_PAGE_SHIFT\t\t3"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"2ecb373e_ebce3186","line":23,"range":{"start_line":23,"start_character":24,"end_line":23,"end_character":25},"in_reply_to":"2ecb373e_4bd74529","updated":"2021-08-11 23:18:24.000000000","message":"this file is included as well in \u0027contrib/loaders/flash/stm32/stm32l4x.S\u0027\n\nso including the bits helper should be avoided.\nbut using the macro BIT(nr) is still useful, thus IMO we can just add the macro definition in place and use it:\n\n#define BIT(nr)   (1UL \u003c\u003c (nr))","commit_id":"43e6920714de4f7aa6893fe555c540071a529170"},{"author":{"_account_id":1000863,"name":"Tarek BOCHKATI","email":"tarek.bouchkati@gmail.com","username":"BouchkatiTarek"},"change_message_id":"bbb756ecccb803a6cf34c26fe506aabaa32454dd","unresolved":false,"context_lines":[{"line_number":20,"context_line":"#define OPENOCD_FLASH_NOR_STM32L4X"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"/* FLASH_CR register bits */"},{"line_number":23,"context_line":"#define FLASH_PG\t\t\t\t(1ULL \u003c\u003c 0)"},{"line_number":24,"context_line":"#define FLASH_PER\t\t\t\t(1UL \u003c\u003c 1)"},{"line_number":25,"context_line":"#define FLASH_MER1\t\t\t\t(1UL \u003c\u003c 2)"},{"line_number":26,"context_line":"#define FLASH_PAGE_SHIFT\t\t3"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"2ecb373e_ee25dfbd","line":23,"range":{"start_line":23,"start_character":24,"end_line":23,"end_character":25},"in_reply_to":"2ecb373e_4eeaf374","updated":"2021-08-17 12:50:44.000000000","message":"yes you are right !\nnow to deal with that decision we need to keep the file as simple as possible and always check both of the driver and the loader.\n\nBut afterwards, when I was writing (#6109) to switch to C code instead of assembly, this common file has been proven useful.","commit_id":"43e6920714de4f7aa6893fe555c540071a529170"},{"author":{"_account_id":1000005,"name":"Andreas Fritiofson","email":"andreas.fritiofson@gmail.com","username":"Nattgris"},"change_message_id":"ffe41c0539e809dc6ee69231f0544a9e4fca037f","unresolved":false,"context_lines":[{"line_number":20,"context_line":"#define OPENOCD_FLASH_NOR_STM32L4X"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"/* FLASH_CR register bits */"},{"line_number":23,"context_line":"#define FLASH_PG\t\t\t\t(1ULL \u003c\u003c 0)"},{"line_number":24,"context_line":"#define FLASH_PER\t\t\t\t(1UL \u003c\u003c 1)"},{"line_number":25,"context_line":"#define FLASH_MER1\t\t\t\t(1UL \u003c\u003c 2)"},{"line_number":26,"context_line":"#define FLASH_PAGE_SHIFT\t\t3"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"2ecb373e_4eeaf374","line":23,"range":{"start_line":23,"start_character":24,"end_line":23,"end_character":25},"in_reply_to":"2ecb373e_ae76f737","updated":"2021-08-16 18:07:31.000000000","message":"In the change that introduced this header file, I voiced my concerns over sharing headers between loader sources and drive C files for this very reason. Personally I really don\u0027t see the point in having the loader include this file. It\u0027s not like we have a shared API between the assembler and driver which depend on these defines. The loader is a free-standing separately built blob which just so happens is using some error flags which are the same as this driver is using. Just define these two error flags in the assembler file and be done with it. They are fixed by the hardware so there will not be an issue with \"oh but what if the defines change\".","commit_id":"43e6920714de4f7aa6893fe555c540071a529170"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"d3d8ea26ffece21dbfe28f1ca70d4427c3407efa","unresolved":false,"context_lines":[{"line_number":20,"context_line":"#define OPENOCD_FLASH_NOR_STM32L4X"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"/* FLASH_CR register bits */"},{"line_number":23,"context_line":"#define FLASH_PG\t\t\t\t(1ULL \u003c\u003c 0)"},{"line_number":24,"context_line":"#define FLASH_PER\t\t\t\t(1UL \u003c\u003c 1)"},{"line_number":25,"context_line":"#define FLASH_MER1\t\t\t\t(1UL \u003c\u003c 2)"},{"line_number":26,"context_line":"#define FLASH_PAGE_SHIFT\t\t3"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"2ecb373e_4bd74529","line":23,"range":{"start_line":23,"start_character":24,"end_line":23,"end_character":25},"in_reply_to":"2ecb373e_cb1b3520","updated":"2021-08-11 18:00:29.000000000","message":"The macro \u0027BIT(nr)\u0027 is preferred here.\nAdd\n#include \u003chelper/bits.h\u003e\non top, then apply the macro in place of the shifts","commit_id":"43e6920714de4f7aa6893fe555c540071a529170"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"85eea74b32ea6ba8d6d46b1fbaccd0d532e016d6","unresolved":false,"context_lines":[{"line_number":20,"context_line":"#define OPENOCD_FLASH_NOR_STM32L4X"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"/* FLASH_CR register bits */"},{"line_number":23,"context_line":"#define FLASH_PG\t\t\t\t(1ULL \u003c\u003c 0)"},{"line_number":24,"context_line":"#define FLASH_PER\t\t\t\t(1UL \u003c\u003c 1)"},{"line_number":25,"context_line":"#define FLASH_MER1\t\t\t\t(1UL \u003c\u003c 2)"},{"line_number":26,"context_line":"#define FLASH_PAGE_SHIFT\t\t3"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"2ecb373e_ae76f737","line":23,"range":{"start_line":23,"start_character":24,"end_line":23,"end_character":25},"in_reply_to":"2ecb373e_ebce3186","updated":"2021-08-16 09:19:09.000000000","message":"I prefer not to re-define stuff. It makes difficult to track such re-definitions.\nThe include files should be safe to be used in .S files. If some is not working, it should be fixed.\nAlready the comment style for SPDX tag is different between .c and .h in order to let the .h working when included by a .S.","commit_id":"43e6920714de4f7aa6893fe555c540071a529170"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"85eea74b32ea6ba8d6d46b1fbaccd0d532e016d6","unresolved":false,"context_lines":[{"line_number":25,"context_line":"#ifndef BIT"},{"line_number":26,"context_line":"#define BIT(nr)                 (1UL \u003c\u003c (nr))"},{"line_number":27,"context_line":"#endif"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"/* FLASH_CR register bits */"},{"line_number":30,"context_line":"#define FLASH_PG\t\t\t\tBIT(0)"},{"line_number":31,"context_line":"#define FLASH_PER\t\t\t\tBIT(1)"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"2ecb373e_4e8bd31b","line":28,"updated":"2021-08-16 09:19:09.000000000","message":"This forces the files .c to first include \"helper/bits.h\" and then this file. You cannot swap the order or you will get redefined macro.\nI agree with this patch only if build fails with include of \"helper/bits.h\", but I would like to see a \"FIXME\" in the comment above.","commit_id":"d46f627b7d938357f5827be961cca38d10b87f5e"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"d60d25a6f45e8340ffef0086854710824e2df8be","unresolved":false,"context_lines":[{"line_number":25,"context_line":"#ifndef BIT"},{"line_number":26,"context_line":"#define BIT(nr)                 (1UL \u003c\u003c (nr))"},{"line_number":27,"context_line":"#endif"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"/* FLASH_CR register bits */"},{"line_number":30,"context_line":"#define FLASH_PG\t\t\t\tBIT(0)"},{"line_number":31,"context_line":"#define FLASH_PER\t\t\t\tBIT(1)"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"2ecb373e_ee3f1f1f","line":28,"in_reply_to":"2ecb373e_0efaab73","updated":"2021-08-16 13:54:29.000000000","message":"My idea is that in another patch the helper/bits.h should be modified so can be included here.\nThe added FIXME is ok to explain the issue.","commit_id":"d46f627b7d938357f5827be961cca38d10b87f5e"},{"author":{"_account_id":1000863,"name":"Tarek BOCHKATI","email":"tarek.bouchkati@gmail.com","username":"BouchkatiTarek"},"change_message_id":"dfa0d45a1fcabbbfce88a3e5c1a47ab9fd9bc400","unresolved":false,"context_lines":[{"line_number":25,"context_line":"#ifndef BIT"},{"line_number":26,"context_line":"#define BIT(nr)                 (1UL \u003c\u003c (nr))"},{"line_number":27,"context_line":"#endif"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"/* FLASH_CR register bits */"},{"line_number":30,"context_line":"#define FLASH_PG\t\t\t\tBIT(0)"},{"line_number":31,"context_line":"#define FLASH_PER\t\t\t\tBIT(1)"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"2ecb373e_0efaab73","line":28,"in_reply_to":"2ecb373e_4e8bd31b","updated":"2021-08-16 13:14:29.000000000","message":"IMHO including the helper/bits.h will be just a source of headaches as it includes a lot of stuff luke helper/replacements.h and so on.\n\nIMO there is no way to include this bits helper as-is, \nand any include from openocd headers should be avoided in this file as it is shared between the openocd app and the baremetal flashloader.\n\nso either we redefine the BIT macro here or we just use the binary shift explicitely.","commit_id":"d46f627b7d938357f5827be961cca38d10b87f5e"}]}
